home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DOSIMP12.ARJ / SIMPLY4.HYP < prev    next >
Text File  |  1992-01-16  |  107KB  |  1,901 lines

  1.                            The |tCONFIG.SYS|t File
  2.  
  3. This is an ASCII text file  that contains some special configuration com-
  4. mands,  which DOS reads each time you reboot your computer as long as the
  5. file  is located  in the root directory  of the disk you're |sboot|sing from.
  6. You can make any changes you want to this file but they won't take effect
  7. until the next time you reboot.   Have a spare boo|1t disk handy first just
  8. in case something doesn't work right, though.  Here are the commands that
  9. can be used in the |nCONFIG.SYS|n file:
  10.     BREAK   COUNTRY DEVICEHIGH DRIVPARM FILES   LASTDRIVE SHELL  SWITCHAR
  11.     BUFFERS DEVIC|1E  DO|1S        FCBS     INSTALL REM       STACKS SWITCHES
  12. BREAK  and REM can also be used  as regular DOS commands,  but the others
  13. can't be used  anywhere except in the |nCONFIG.SYS|n file,  and no other com-
  14. mands besides these  can be used  in this file.   Any number of DRIVPARM,
  15. INSTALL, REM, DEVIC|1E, or DEVICEHIGH commands can be used,  but the others
  16. can only be used once in the file.   The DEVIC|1E command is used to activ-
  17. ate |sdevice driver|ss.  RAMDRIVE.SYS, DRIVER.SYS, SMARTDRV.SYS, and ANSI.SYS
  18. are a few examples  of |sdevice driver|ss  that come  with DOS.   Each device
  19. driver  can also be  loaded only once,  except DRIVER.SYS and the RAMdisk
  20.                      <page down> for more CONFIG.SYS
  21. drivers, which can be repeated.
  22.  
  23. One thing  that very few people know,  is that DOS does not read the com-
  24. mands in the |nCONFIG.SYS|n file in the order they're written.   It looks for
  25. each command when it's good and ready.   Of course, when it gets ready to
  26. look for DEVIC|1E commands,  it reads all of them  and executes them in the
  27. order they're listed.   When it gets ready to look for  INSTALL commands,
  28. it does that,  in the order they're listed.   But it doesn't read any IN-
  29. STALL commands until after it reads all the DEVIC|1E commands,  even if the
  30. INSTALL commands  are all earlier in the  |nCONFIG.SYS|n file than the DEVIC|1E
  31. commands.   So,  it definitely does matter what order you put your DEVIC|1E
  32. commands in,  but it doesn't matter whether they come before or after the
  33. BUFFERS command, or the DO|1S command, or the LASTDRIVE command.  DOS could
  34. not care less  about the order of your |nCONFIG.SYS|n commands  except in the
  35. case of more than one occurrence of the same command.
  36.  
  37.  
  38.  
  39.  
  40.                     <page down> for The |nBREAK|n Command
  41.                             The |TBREAK|T Command
  42.  
  43. Here's a command  that's not used very often.   What it does,  is to turn
  44. |nextended|n break checking on and off.  The default is off, so the only time
  45. you need to use it is to turn it on,  or to turn it off if you've already
  46. turned it on.
  47.  
  48. So what is break checking?  Well you can press the <Ctrl-Break> keystroke
  49. combination to break out of a program that's running,  if you decided you
  50. didn't want to do it after all, or if it seems that something in the pro-
  51. gram has  gone wrong.   Well if |nBREAK|n  is off,  then DOS will  only check
  52. to see if  you have pressed  <Ctrl-Break>  each time an I/O  operation is
  53. performed.   That means  when the program  is looking for input  from the
  54. keyboard  or serial port,  or when the program  is sending output  to the
  55. screen, printer, or serial port.   However, if |nBREAK|n is on, then DOS will
  56. check the keyboard buffer for a <Ctrl-Break>  keystroke every single time
  57. the program makes any DOS function call.   This includes when the program
  58. is writing to disk, and all sorts of things.   To put it simply, |nBREAK|n ON
  59. makes it so that you can break out of a program a lot more easily, but of
  60.                         <page down> for more BREAK
  61. course  it slows your system down  because DOS has to take time  to check
  62. the keyboard  buffer a lot more often.   And if you  break out  of a disk
  63. write, that disk's FAT can easily get trashed.  Totalled.  Ruined.
  64.  
  65. |nBREAK|n OFF  puts the break setting back to normal,  which means that break
  66. checking will occur  more seldom and the system  will not be  slowed down
  67. by checking for break  so often.   The command |nBREAK|n  all by itself, with
  68. no ON or OFF parameters, will just report the |ncurrent|n state of |nBREAK|n.
  69.  
  70. The <Ctrl-C> keystroke combination is the same thing as <Ctrl-Break>.
  71.  
  72. This command can also be used in the CONFIG.SYS file if desired.  In this
  73. case you use an equals sign (=) between the command and the parameter, as
  74. in BREAK=ON.  Of course BREAK=OFF would never be needed in the CONFIG.SYS
  75. file because |nBREAK|n is always off every time you reboot until such time as
  76. a |nBREAK|n ON command is issued.   I would never recommend using BREAK=ON in
  77. the CONFIG.SYS file.  It is dangerous and it slows the computer down.  If
  78. you have  a program that requires |nextended|n break checking,  run it from a
  79. batch file that turns |nBREAK|n on at the beginning and off at the end.
  80.                    <page down> for The |nBUFFERS|n Command
  81.                            The |TBUFFERS|T Command
  82.  
  83. This command can only be used in your CONFIG.SYS file.   It tells DOS how
  84. many disk buffers to set up if you don't want to use the default.  A disk
  85. buffer is just like a very small cache with no look-ahead.   So if you're
  86. using a disk cache,  you want to use a very small number of buffers, such
  87. as 4.   (Certainly not 0, though.)   If not, use the largest one that the
  88. installation manuals for your applications say.   If one manual tells you
  89. that app needs 25, and the manual for another app says 30, then use 30.
  90.  
  91. The syntax for the |nBUFFERS|n command is like this:
  92.           BUFFERS=AA,BB /X
  93. The "AA" parameter in that example,  is the number  of buffers DOS should
  94. set up.   Each buffer  takes 528 bytes  of memory,  to store 512 bytes of
  95. disk data.
  96.  
  97. If you're using conventional or hig|1h memory for the buffers, you can have
  98. anywhere from  1 to 99 of them.   If you have a DOS version  earlier than
  99. 3.3,  the default is 2.   If your DOS is 3.3 or later,  then your default
  100.                        <page down> for more BUFFERS
  101. number of buffers  depends on your hardware.   If you have more than 256K
  102. of RAM, then it's 10.  Or if you have over 512K, it's 15.
  103.  
  104. If you have DOS version 4.0 or later,  then you can use the ,BB parameter
  105. in that example  to specify the number of  look-ahead |ssector|ss.   (See the
  106. section on Cache for what that means.)   This parameter is optional,  but
  107. if you want any look-ahead |ssector|ss, you can use anywhere from 2 to 8, and
  108. they each take up 512 bytes of RAM.   If you're using  a real disk cache,
  109. then leave this parameter at the default,  which is 1 and  means no look-
  110. ahead.
  111.  
  112. Another thing you can do, but only if you have DOS version 4, is to place
  113. your buffers into expanded memory if you have it, to keep them from using
  114. up your conventional memory.  Expanded memory is what the /X parameter is
  115. for in the  |nBUFFERS|n command.   And you are allowed  up to ten thousand of
  116. them, instead of the normal limit of 99.
  117.  
  118. Now in DOS version 5.0,  if you have one meg of RAM  so that you can load
  119. DOS into the Hig|1h Memory Area, then the buffers go up there too, with the
  120.                        <page down> for more BUFFERS
  121. rest of the DOS kernel.  That is, if there is room for all of them.  See,
  122. if you specify a number so large that they can't all fit up there the way
  123. it is, like 46 for example,  there is one small section of the DOS kernel
  124. that can come back down  to conventional memory  to allow that huge chunk
  125. of buffers to go hig|1h.   Or if you use an even larger number, like 50, so
  126. that they won't  fit up there  even with that little piece  of DOS coming
  127. back down, then the buffers will all stay in conventional memory.  But if
  128. you specify just the right amount, like 36 to 44 (it differs on different
  129. computers),  then all of the buffers can go hig|1h, and all of the DOS ker-
  130. nel can stay hig|1h too  and you don't lose a byte  of conventional memory,
  131. whether you use that large number of buffers, or a low number like 4.
  132.  
  133. Anyway,  once you get up  over 40 buffers,  it takes DOS about as long to
  134. search all those buffers for the required data as it would to just get it
  135. from the hard drive,  so having that many buffers  can actually slow your
  136. system down.  Even fewer buffers than 40 can slow your system down if you
  137. are using a disk cache.   Because the buffers only hold a small amount of
  138. data, but the computer is going to search there before it searches in the
  139. cache, so the buffers waste time that would be better spent on the cache.
  140.                     <page down> for The DEVICE Command
  141.                             The |TDEVIC|1E|T Command
  142.  
  143. This is a command  that only works in your  CONFIG.SYS file,  and what it
  144. does is load a device driver  into memory.   You have to watch what order
  145. you put the DEVICE lines into your CONFIG.SYS file though.   For example,
  146. any device that wants to use  expanded memory has to come after  the line
  147. that loads your expanded memory manager.
  148.  
  149. The syntax is quite simple.   Just remember that you  have to include the
  150. full file specification, including the path and the filename's extension,
  151. for the device driver  you're trying to load.   Since the CONFIG.SYS file
  152. is read during |sboot|sup before COMMAND.COM  loads and AUTOEXEC.BAT gets ex-
  153. ecuted,  there is no  PATH variable  in the environment yet  so DOS can't
  154. find any file that's not in the root directory of the boo|1t disk.  But you
  155. shouldn't keep  any |sdevice driver|ss in the root directory  of a hard disk.
  156. Put them into a subdirectory to keep your root directory clean.  A DEVICE
  157. command should look similar to this:
  158.           DEVICE=C:\DOS\ANSI.SYS
  159.  
  160.           <page down> for What Is an Installable Device Driver?
  161.                   What Is an Installable |tDevice Driver|t?
  162.  
  163. The computer needs to have  a |ndevice driver|n  for all the device|1s that you
  164. want it to be able  to deal with.   The monitor,  the keyboard,  the disk
  165. drives,  the printer,  the mouse,  the modem,  the expanded memory board,
  166. these are just some of the device|1s that get attached to computers  (other
  167. than their users).   Well the computer has  a lot of built-in device dri-
  168. vers, such as the ones for CON, AUX, and PRN.   Device|1s that are not used
  169. by all computers  at all times  need to have a piece  of software  loaded
  170. during each |sboot|sup,  that teaches the computer how to deal with these de-
  171. vices.   And these pieces of software  are called installable device dri-
  172. vers.  (See also TSR.)
  173.  
  174. You install a |ndevice driver|n  into the computer's memory by using a DEVIC|1E
  175. or DEVICEHIGH command in your  CONFIG.SYS file before you boot the compu-
  176. ter.   Some of the  device drivers  that come with DOS  are RAMDRIVE.SYS,
  177. ANSI.SYS, DRIVER.SYS, HIMEM.SYS, and SMARTDRV.SYS.  Don't ever even think
  178. about trying to use a file that has the .COM extension with a DEVIC|1E com-
  179. mand!   A file that has the  .SYS extension is probably  a |ndevice driver|n,
  180.                     <page down> for more Device Driver
  181. but any other extension, don't do it unless the book tells you to!
  182.  
  183. All device drivers  use up some of your memory.   Even the ones that have
  184. switches that make them use extended or expanded memory.  For example, if
  185. you use the /E switch to put the RAMDRIVE.SYS |ndevice driver|n into extended
  186. memory,  it's only the RAMdisk itself that goes into the extended memory.
  187. The |ndevice driver|n,  which you could think of as the  |sRAMdisk|s's drive con-
  188. troller, is still in conventional memory.  It's very small, however.  For
  189. example, mine only uses up 1184 bytes.   It's well worth it.  Most device
  190. drivers take up  very small amounts of memory.   But if you use  a lot of
  191. them all at once,  it does add up.   That's why  we like to have  ways of
  192. putting them into  the upper memory area,  such as with DOS version 5.0's
  193. DEVICEHIGH command.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                 <page down> for The |nANSI.SYS|n |nDevice Driver|n
  201.                         The |tANSI.SYS|t Device Driver
  202.  
  203. You can do really great things  with this console driver,  if you install
  204. it in your CONFIG.SYS file.  Edit CONFIG.SYS to include this line:
  205.           |sDEVIC|1E|s=C:\DOS\ANSI.SYS
  206. (That is assuming you have the |nANSI.SYS|n file in your DOS directory.)  And
  207. reboot your computer.   Now you're ready to use |nANSI.SYS|n, but what is it?
  208. It's a device driver that allows you much more control over your |sCON|ssole,
  209. or  monitor-and-|skeyboard|s.   You can change the colors on your screen,  or
  210. make your own keyboard macros.   This involves  using a thing  called the
  211. ESCape character.   The easiest way  to get this character to the screen,
  212. where the  ANSI device driver  can see it  and interpret it,  is with the
  213. PROMPT command.   One of the metacharacters  which are used as parameters
  214. to  this command is $e,  which  will put  an ESCape  character  into your
  215. prompt.  Well this is what it's for.
  216.  
  217. The reason you can't  just type the ESC key  to get the  ESCape character
  218. into a command,  is that in DOS, or in most text editors and word proces-
  219. sors, the ESC key has some special meaning.  For example, at the DOS com-
  220.                       <page down> for more ANSI.SYS
  221. mand line,  a touch of the ESC key  causes DOS to abort  the command  you
  222. were typing and give you a new blank command line.   You need to use some
  223. other method to get the ESCape character into a command or batch file.
  224.  
  225. To change  the color  of your screen from  the dull drab gray-on-black of
  226. normal DOS, the PROMPT command you'll need is PROMPT $e[1;3x;4ym where 3x
  227. is the foreground (text) color, and 4y is the background color.  The col-
  228. lor codes, that take the place of the x and the y, are as follows:
  229.        0  black       1  red         2  green       3  yellow
  230.        4  blue        5  magenta     6  cyan        7  white
  231. The 1; in that command is for bold text and is optional.  (Yellow usually
  232. looks orange unless you use bold.)   Notice that the m at the end of that
  233. command must be in lowercase  or the command won't work.   It's just that
  234. simple to make your screen whatever color you choose.   Remember, though,
  235. that this changes the PROMPT variable in the environment, so you lose the
  236. PROMPT statement you had already set up.   It'll look like you don't have
  237. a prompt at all anymore.  So what you might want to do is add your normal
  238. PROMPT statement to the end of that one, like this:
  239.           PROMPT $e[1;3x;4ym$p$g
  240.                       <page down> for more ANSI.SYS
  241. Now you have both your new color scheme and your old |sprompt|s!  Another way
  242. is to use two separate commands,  the color changing command, followed by
  243. the regular PROMPT command  to get your  normal prompt back.   This would
  244. save space in the environment,  because the longer color command would be
  245. replaced by the shorter normal PROMPT command.  If you use this method in
  246. a batch file though, you need to observe the rules mentioned under macros
  247. about the use of multiple PROMPT statements in a batch file.
  248.  
  249. Now,  when ANSI changes  your screen colors,  it will only change what is
  250. written on the screen from that time on.   It will not automatically make
  251. your whole screen change.   In order to get the whole screen  filled with
  252. your new colors, all you need to do is clear the screen with the CLS com-
  253. mand.  Another way to clear the screen is to use the ANSI ESCape sequence
  254. 2J.  Just add it to the end of your color-changing command:
  255.           PROMPT $e[1;32;40m$e[2J
  256. This time the J  ANSI command  must be in uppercase,  as opposed to the m
  257. and p ANSI commands which must be in lowercase.  Now remember, if you use
  258. this method of clearing the screen,  don't add your normal prompt  to the
  259. end of it.   You must give a normal PROMPT command separately,  and after
  260.                       <page down> for more ANSI.SYS
  261. that one that includes 2J,  or else the screen will be cleared every time
  262. you hit <Enter>, before you get a chance to see the result of the command
  263. you just entered.
  264.  
  265. Using ANSI to set up |tmacros|t  is just as easy!   A PROMPT command for that
  266. purpose would look like this:
  267.           PROMPT $e[0;68;"|sDIR|s";13p
  268. Notice that the p  at the end of that command must be in lowercase or the
  269. command will not work.   The number combination 0;68 stands for the <F10>
  270. key,  and the 13 stands for the <Enter> key.   (See the ASCII subject for
  271. the codes for all the function keys.)   Therefore, the above PROMPT would
  272. cause the <F10> key  to be reassigned as  DIR <Enter>,  so every time you
  273. hit the <F10> key, you would automatically get a directory listing.   You
  274. can put any command you want into one of these |nmacros|n, even more than one
  275. command into the same macro.   Suppose that you like to clear your screen
  276. before you look at a DIR listing.  The following command would set up the
  277. <F10> key to do that for you:
  278.           PROMPT $e[0;68;"|sCLS|s";13;"|sDIR|s";13p
  279. ANSI  will write  the parts in quotes  exactly the way  they are entered.
  280.                       <page down> for more ANSI.SYS
  281. The parts that are not in quotes are interpreted  as decimal ASCII codes.
  282. The quoted strings  and the decimal  ASCII strings  must be  separated by
  283. semicolons (;).
  284.  
  285. Another type of "macro" you can use ANSI for, is rearranging the way your
  286. keyboard is set up.  Do you need to use the " a lot more often than the '
  287. and you're tired of hitting the <Shift> key to get to the "?  Well, since
  288. the ASCII code for " is 34 and the code for ' is 39, you can do this:
  289.           PROMPT $e[34;39p
  290.           PROMPT $e[39;34p
  291. Now whenever you hit the  ' key you'll get  " and then to make a ' you'll
  292. have to use the <Shift> key.
  293.  
  294. This is not  a perfect solution,  however,  because not  all applications
  295. recognize  ANSI key reassignments.   Some programs will still give you  '
  296. whenever you hit ' even though you have " assigned to the ' key.   But it
  297. can't hurt to try.   Maybe your  favorite word processor  will let you do
  298. these reassignments.  At any rate, the changes will work in DOS for sure.
  299.  
  300.                       <page down> for more ANSI.SYS
  301. You can put all your keyboard redefinition |sPROMPT|ss, and your color change
  302. PROMPT into your AUTOEXEC.BAT file or any other batch file.  There is one
  303. problem with this,  however.   Most people like to have ECHO off in their
  304. AUTOEXEC.BAT file,  so the screen stays as clean as possible during boot-
  305. up.   But when ECHO is off,  the PROMPT string is not sent to the screen.
  306. So the ANSI  ESCape sequence is not seen  by the ANSI driver,  so it will
  307. not be acted upon, until the end of the batch file, when DOS automatical-
  308. ly turns ECHO back on.  But by then it's too late for all but the last of
  309. the PROMPT strings to be interpreted  by the ANSI driver,  since each new
  310. PROMPT statement  replaces the old  PROMPT statement  in the environment.
  311. The last PROMPT statement executed is the only one  which will be seen by
  312. the ANSI driver,  unless ECHO is on while these PROMPT statements are be-
  313. ing sent  to the environment.   You don't need  to leave ECHO on  for the
  314. entire batch file, however,  just from the line immediately following the
  315. first PROMPT statement,  until the line  immediately  preceding  the last
  316. PROMPT statement.
  317.  
  318. There's an easy way to get around this problem,  though,  if you have DOS
  319. version 3.3  or later.   This version added  the @ symbol to  the list of
  320.                       <page down> for more ANSI.SYS
  321. batch file commands, to suppress the display of any line in a batch file.
  322. You still need to have  ECHO on for this,  but the ugly old  PROMPT lines
  323. will not show on the screen.   You just precede each  PROMPT command with
  324. the @ symbol, and then leave a blank line right after that, then the next
  325. @|sPROMPT|s line, another blank line, etc.   After all your @|sPROMPT|s lines and
  326. blank lines,  then turn ECHO off for the rest of the batch file.   And do
  327. not forget to  issue a normal  PROMPT command afterward,  or else it will
  328. look like you don't have a prompt at all, since any ESCape sequences sent
  329. to the screen are intercepted  and interpreted  by the ANSI driver before
  330. they get there.
  331.  
  332. There are other ways  to get the ESCape character to the screen,  besides
  333. using the PROMPT command,  but they aren't really used  so much by begin-
  334. ners.   The ESC character can be represented  by the ^[ keystroke combin-
  335. ation, but in most text editors or word processors,  if you enter ^[, the
  336. same thing will occur as what would happen if you hit the <Esc> key.   (A
  337. symbol like ^[ always means  to hold down the <Ctrl> key while typing [.)
  338. But most text editors and word processors  do have a way to enter control
  339. characters into the text.   The DOS command EDLIN uses ^V.   If you enter
  340.                       <page down> for more ANSI.SYS
  341. ^V followed immediately  by the [ character,  then the ^[ (ESC) character
  342. will be inserted into the text.   When you enter this into EDLIN it's go-
  343. ing to look like this on the screen at first:  ^V[[1;31;40m.   But if you
  344. later list the file,  or save it  and edit it  again later,  you will see
  345. ^[[1;31;40m.  The V has disappeared!   But that's ok, it's supposed to do
  346. that.   The ^V  was just there  to tell EDLIN  that the [ was supposed to
  347. mean a ^[,  and that's what it did,  because now it says  ^[.   But don't
  348. forget, the ^[ represents only the ESCape character,  and the combination
  349. that ANSI will recognize as one of its commands, is ESC + [.  The [ needs
  350. to follow the ^[ which stands for ESC, so you need two [ symbols there.
  351.  
  352. If you have DOS version 5.0,  you can use the EDIT command instead of the
  353. EDLIN line editor, because it's easier to use.   If you do, ^P + ESC will
  354. do the same thing as ^V + [ does in EDLIN--give you an ESC character.
  355.  
  356. Different editors use different methods, however,  so if you're not using
  357. EDLIN or EDIT, you'll have to check the manual for your editor.  Once you
  358. know the method your editor uses to get control characters into the text,
  359. the possibilities are endless.  You could create a text file called HELLO
  360.                       <page down> for more ANSI.SYS
  361. .TXT which looks kind of like this:
  362.           ESC[31;40mHi there!                       (red)
  363.           ESC[37;40mHow are you?                  (white)
  364.           ESC[34;40mI am fine.                     (blue)
  365.           ESC[0m                         (back to normal)
  366. Now when you enter the command TYPE HELLO.TXT, your screen will show that
  367. text (not including the ugly part) in colors!  You can also use a similar
  368. technique in a batch file.  Just use the ECHO command, like this:
  369.           ECHO ESC[31;40mHi there!
  370.  
  371. And remember,  with TYPE and ECHO, you do not need to have ECHO on during
  372. this part of the batch file like you do  if you're using PROMPT $e to en-
  373. ter the ESCape character,  because these commands will send the string to
  374. the screen even if DOS doesn't  send the command to the screen.   So just
  375. use TYPE to display a text file that has ESC codes in it, or use the ECHO
  376. command in place of PROMPT in a batch file, with ESC in place of $e.
  377.  
  378. Another way to get the ESC character into a file is with the CLS command.
  379.  
  380.                       <page down> for more ANSI.SYS
  381. Of course,  you use the same techniques  to get the ESC character  into a
  382. file, whether for the purpose of color, or for the purpose of macros.
  383.  
  384. To un-assign  function keys  that have been made  into macros  using ANSI
  385. ESCape sequences, you just reassign them to their normal ASCII code.  For
  386. example,  if you had the <F10> key reassigned to "|sDIR|s";13,  you just need
  387. to reassign it back to <F10>, like this:
  388.           PROMPT $e[0;68;0;68p
  389.  
  390. A few caveats  about using ANSI to create macros.   First,  remember that
  391. DOS has its own functions  for the <F1> through  <F7> keys,  so you don't
  392. want to reassign those.  But you can reassign <F8> through <F10>, as well
  393. as <Shift-F1> through <Shift-F10>, <Alt-F1> through <Alt-F10>, and <Ctrl-
  394. F1> through <Ctrl-F10>.  (Although if you're using DOS version 5 with the
  395. DOSKEY command, you don't want to reassign any keys that it uses either.)
  396. But not all of them!  The |nANSI.SYS|n device driver sets aside only a limit-
  397. ed amount of memory for holding  these keystroke redefinitions.   I can't
  398. tell you how many keys you can assign, because it'll depend on the length
  399. of each macro you're using.   But if you have some keys assigned, and try
  400.                       <page down> for more ANSI.SYS
  401. to assign one more and it won't work,  chances are that it's because that
  402. chunk of memory is full.
  403.  
  404. One last thing.  Don't expect these macros to work anywhere except in DOS
  405. because most programs have their own uses for the function keys, and will
  406. take over  control of them  while you're in the program.   But as soon as
  407. you exit back to DOS, the macros will work again.  Some programs will al-
  408. low the ANSI reassignment to work though, and it can't hurt to try.
  409.  
  410. You can even use |nANSI.SYS|n to create your very own screen blanker, to save
  411. your monitor  from having the same image sitting on it  for hours burning
  412. permanently into the screen.   Let's say you wanted to use F9 to make the
  413. screen blank, and F10 to make the screen come back up again.   Just issue
  414. these two ANSI commands:
  415.           PROMPT $e[0;67;"BLANK";13p
  416.           PROMPT $e[0;68;"BACK";13p
  417. Now create these two batch files, and put them into a directory that's on
  418. your PATH.  Here's BLANK.BAT:
  419.           @|sPROMPT|s $e[0;30;40m$e[2J
  420.                       <page down> for more ANSI.SYS
  421. And here's BACK.BAT:
  422.           @|sPROMPT|s $e[1;32;40m$e[2J
  423.                (leave this line blank)
  424.           @|sPROMPT|s $p$g
  425.           @|sECHO|s OFF
  426. Now whenever you're at the DOS prompt,  if you hit the F9 key,  that will
  427. execute  the BLANK.BAT file,  which sets your  screen colors  to non-bold
  428. black  on black,  and clears  the entire  screen  to those colors.   Your
  429. screen goes absolutely as black as if the computer were turned off.   You
  430. can type whatever you want,  and though your commands will execute, noth-
  431. ing will show  on the screen.   Because everything  is being displayed in
  432. black on black.   Now hit the F10 key,  which causes BACK.BAT to execute,
  433. which puts  your screen colors  back to bold  green on black,  clears the
  434. screen to those colors, sets your prompt back to current-drive-and-direc-
  435. tory,  and turns ECHO off  so that you won't get  a double prompt  on the
  436. screen when that batch file finishes executing.  So everything is back to
  437. normal again.
  438.  
  439. There are also  some other very useful ANSI commands,  which are probably
  440.                       <page down> for more ANSI.SYS
  441. listed in your DOS manual, and now that you know more about the ESC char-
  442. acter, you can probably understand that chapter in the manual.  And there
  443. are several shareware clones of |nANSI.SYS|n,  such as NANSI.SYS,  which work
  444. just the same way only much faster!  So check them out and have some fun!
  445.  
  446. A lot of people  will try to tell you  that if you want to start  using a
  447. modem and |sBBS|ss,  you'll need to have |nANSI.SYS|n loaded  via your CONFIG.SYS
  448. file in order to be able  to receive color graphics.   This was true many
  449. years ago,  but not  any more.   Well,  there are still a  very few older
  450. modem communications programs that  support ANSI graphics  but not inter-
  451. nally.   If you use one of those,  then you will indeed need  |nANSI.SYS|n in
  452. your  CONFIG.SYS  file.   But programs  that require  that are  very old.
  453. There are also a few communications programs that just don't support ANSI
  454. color graphics  at all,  and it doesn't matter  in the least  whether you
  455. have  |nANSI.SYS|n in your  CONFIG.SYS file,  you're not  going to  get color
  456. graphics  with those comm programs.   But the vast majority  of comm pro-
  457. grams that exist nowadays, support ANSI graphics all by themselves.  They
  458. couldn't care less  whether you have  |nANSI.SYS|n  in your  CONFIG.SYS file,
  459. they have their own  |ninternal|n ANSI support,  as long as you  tell them to
  460.                       <page down> for more ANSI.SYS
  461. use ANSI or VT-100 terminal emulation!  (Look in your comm program's man-
  462. ual for the words  emulation and configuration.)   Now if you have one of
  463. those few programs that just won't support ANSI no matter what, or if you
  464. just haven't yet figured out how to configure your comm program to do it,
  465. you want to tell  the BBS computer  not to be sending you any ANSI graph-
  466. ics.   Because if your software doesn't support ANSI and the BBS is send-
  467. ing you the ANSI codes, your BBS screen is going to look kinda like this:
  468.                              [34;47mMain Menu
  469.           [37;42mF[34;42miles Menu        [37;42mM[34;42message Menu
  470.           [37;42mB[34;42mulletin Menu     [37;42mG[34;42moodbye (log off)
  471. because your software  isn't intercepting and  translating all those ANSI
  472. color control codes,  so they're showing up on your screen  mixed in with
  473. the text that is supposed to show up.
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.                    <page down> for The |nDRIVPARM|n Command
  481.                            The |TDRIVPARM|T Command
  482.  
  483. This command is used in the  CONFIG.SYS file,  but it's  pretty rare that
  484. it's needed.   It's only necessary  if you replace an old floppy drive or
  485. add a new one,  that is not supported  by the BIOS  in your machine or by
  486. your DOS version.  It sets the drive characteristics for existing physic-
  487. al drives.   If you can read and write disks in your floppy drive but you
  488. can't properly FORMAT brand new disks,  then this is probably the command
  489. that will help you.
  490.  
  491. If you think you need to try this command,  check your DOS manual because
  492. the syntax and |sdefault|ss  are different for different DOS versions.   Also
  493. some brands of DOS  don't even support  this command.   If you can't make
  494. this work,  then try  DRIVER.SYS  which is a  device driver  that sets up
  495. logical drives inside of physical drives.
  496.  
  497. If you have DOS  version 5.0 and a 720K disk drive,  it might FORMAT your
  498. disks to only 360K capacity.   If so, put this command in your CONFIG.SYS
  499. file:  DRIVPARM=/D:0 /F:2  if your 720K drive is A:,  or use /D:1 instead
  500.                       <page down> for more DRIVPARM
  501. if it is your B: drive.   The reason this  might be necessary,  is if you
  502. have a drive  that your BIOS doesn't support,  but the version of DOS you
  503. were using had been specially modified to support that drive.   Then when
  504. you upgraded to regular old MS-DOS,  from the version you had been using,
  505. your special  drive support  (that you didn't  even know  you had)  isn't
  506. there any more, so now you need the |nDRIVPARM|n command.
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.                  <page down> for What Are Logical Drives?
  521.                          What Are |tLogical Drives|t?
  522.  
  523. Well,  a logical drive is one that  doesn't really exist physically,  but
  524. that DOS thinks exists.   For example, a RAMdisk.  That's just a chunk of
  525. memory that DOS has been told to treat like a disk.   It has a drive let-
  526. ter, like D: or E:,  and you can copy files to it, or read files from it,
  527. but you can't open up the computer's case  and put your hand on it.   Be-
  528. cause it's a section of memory.   So it's not a physical drive, but it is
  529. a logical drive because DOS treats it like a drive.
  530.  
  531. If you have a very large hard drive and you have it partitioned into more
  532. than one section  (that was probably done with |sFDISK|s),  each with its own
  533. drive letter,  DOS treats those partitions as if they were totally separ-
  534. ate drives,  even though they're all right there on the one physical hard
  535. drive.  Those are |nlogical drives|n too.
  536.  
  537. If you have used the SUBST command to tell DOS that you are going to pre-
  538. tend that your  C:\WORD\DOCS directory is really drive F:,  then that's a
  539. logical drive too.   You can't open up your computer's case  and find any
  540.                    <page down> for more Logical Drives
  541. drive F: that's separate from any of your other physical drives,  and yet
  542. DOS will let you  refer to the files in  C:\WORD\DOCS  by just  using the
  543. letter F:.
  544.  
  545. What if you have  a computer with only one floppy drive,  drive A:?   How
  546. could you possibly  copy files from one floppy disk  to another?   If you
  547. tried the command COPY A:FILENAME.EXT A:,  hoping that DOS would tell you
  548. to put a different disk in the drive to accept the copy,  well sorry, but
  549. that's not going to happen.   DOS is going to say  "File cannot be copied
  550. onto itself".   What can you do?   Easy.   COPY A:FILENAME.EXT B: will do
  551. it.   But you don't have a drive B:, you say?   Sure you do.  Not a phys-
  552. ical one, but a logical one.  Whenever you only have one floppy drive DOS
  553. automatically gives you a logical drive B:  which is sort of a ghost twin
  554. to drive A:.   So you can do lots of operations  that require two drives,
  555. and DOS will just tell you  at the appropriate moment,  whether to put in
  556. the disk for drive A: or the one for drive B:.  You put them in the exact
  557. same place, but DOS keeps track of which is which.
  558.  
  559. Well if you do have  a physical drive B:,  you can still  convince DOS to
  560.                    <page down> for more Logical Drives
  561. give you |nlogical drives|n to go with your floppy drives like that.   With a
  562. device driver  called  |tDRIVER.SYS|t.   You load this contraption  into your
  563. CONFIG.SYS file  with a DEVIC|1E command,  and DOS will set up  the logical
  564. drives,  and assign the drive letters  according to  whatever drives  you
  565. already have.   Suppose you have  a hard drive  partitioned into  logical
  566. drives C: and D:,  and you have a RAMdisk E:,  and you put the |nDRIVER.SYS|n
  567. in after the line that  loads the RAMdisk,  then the first  logical drive
  568. you set up with |nDRIVER.SYS|n will be F:, the next one will be G:, etc.
  569.  
  570. Don't ever forget, DOS assigns logical drive letters to |nlogical drives|n on
  571. a first come, first served basis.   Every time you boot up,  DOS looks to
  572. see how many hard drive partitions you have, and gives them each a letter
  573. starting with C:.  Supposing your hard drive has only one partition, then
  574. D: is the next letter available by the time  DOS executes the commands in
  575. the CONFIG.SYS file, so the first DEVIC|1E command in CONFIG.SYS that tries
  576. to set up a logical drive, will get the letter D:.  Then the next request
  577. for a logical drive from CONFIG.SYS will get letter E: and so forth until
  578. CONFIG.SYS is finished.  You can't control the order in which DOS assigns
  579. drive letters to physical drives,  because it will always be in alphabet-
  580.                    <page down> for more Logical Drives
  581. ical order, but by changing the order of the statements in CONFIG.SYS you
  582. can control which |nlogical drives|n will get what drive letters.
  583.  
  584. Now if you were already using  some SUBST commands  in your  AUTOEXEC.BAT
  585. file perhaps, for drive letters F: and G:,  you'll have to change them to
  586. H: and I:  if you create |nlogical drives|n  in the CONFIG.SYS file  that re-
  587. ceive drive letters F:  and G:.   Because the letters F:  and G:  are now
  588. going to refer to your floppy drives,  so you don't want to use them  for
  589. SUBST commands.   Also,  any batch file that is going to  reference those
  590. |sSUBST|situted drives,  you have to change those references to H:  and I: as
  591. well.   Setting up |nlogical drives|n  with DRIVER.SYS can affect any logical
  592. drives that you had set up with |sRAMdisk|ss or SUBST commands, so watch what
  593. your batch files say!  If you add or remove any |nlogical drives|n, that will
  594. change the drive letters that your other  |nlogical drives|n are going to re-
  595. ceive, but your batch files are still referring to the same drive letters
  596. as before, which now are assigned to different |nlogical drives|n, and that's
  597. going to be  a real mess unless you  update each batch file  with the new
  598. drive letter assignments.
  599.  
  600.                    <page down> for more Logical Drives
  601. If you use your RAMdisk all the time, and plan to keep DRIVER.SYS in your
  602. CONFIG.SYS file only sometimes, then put the DRIVER.SYS line or lines af-
  603. ter the RAMdisk line.   That way,  whether you're using the DRIVER.SYS or
  604. not,  your RAMdisk keeps its same drive letter all the time.   If you put
  605. the DRIVER.SYS before the RAMdisk, then your |sRAMdisk|s's drive letter would
  606. be always changing depending on whether you have the DRIVER.SYS installed
  607. today or not.  If you plan to use DRIVER.SYS all the time and RAMdisk on-
  608. ly sometimes, then do it the other way around.  Put the RAMdisk after the
  609. DRIVER.SYS,  so your "ghost twin" floppies  always keep  their same drive
  610. letters, whether or not you are using a RAMdisk today.   If you do change
  611. the order of the logical-drive-creating commands in CONFIG.SYS,  you have
  612. to remember to change every batch file you have that references a logical
  613. drive letter.
  614.  
  615. Even more important,  whether you're using SUBST or not,  or using a |nRAM|n-
  616. disk or not, any time you create |nlogical drives|n in any way,  DOS needs to
  617. be warned that you  are going to be using them.   If you're ever going to
  618. end up with a drive F: or a drive J:,  you have to have a  LASTDRIVE com-
  619. mand in your CONFIG.SYS file  to tell DOS how many  |nlogical drives|n you're
  620.                    <page down> for more Logical Drives
  621. going to be using.
  622.  
  623. Now suppose you do have those drives set up the way I mentioned,  so that
  624. when DOS gets to the DRIVER.SYS line  in CONFIG.SYS the letters F: and G:
  625. are the next available ones,  DOS will assign F:  to the first DRIVER.SYS
  626. statement you have, and if you have another one too,  it will get G:, and
  627. the next one will get H:,  and so forth.   If the first one was set up to
  628. match your A: drive then you can do something like COPY A:FILENAME.EXT F:
  629. just like a person without a B: drive can do COPY A:FILENAME.EXT B:.  DOS
  630. will tell you when to take out the A:  disk and put the F:  disk into the
  631. same physical drive.  Now you can copy files from one 3.5" disk to anoth-
  632. er even if you only have  one physical disk drive  of that size.   Before
  633. DRIVER.SYS, you could only do that with the DISKCOPY command.
  634.  
  635. Know what else you can do with |sDRIVER.SYS|s?  If your physical drive A: is,
  636. for example,  a high density 5.25" drive,  you can set up a logical ghost
  637. twin for it  that is a double density  5.25" drive,  and then you can say
  638. FORMAT F: instead of remembering to say  FORMAT A: /F:360 and the disk'll
  639. get formatted to double density even though it's physically being done in
  640.                    <page down> for more Logical Drives
  641. a high density drive.   If you tell DOS that F: is a 360K drive, then DOS
  642. will use the 360K format when you specify drive F:.  (Of course that will
  643. not work the other way around.   If you have a double density drive,  you
  644. can't make DOS pretend that it's a high density drive.   A double density
  645. drive just doesn't have the right hardware  to read or write high density
  646. disks, no way, no how.)
  647.  
  648. If you did that, making a double density logical drive twin for your high
  649. density physical drive, you can still use high density disks in that dou-
  650. ble density logical drive!   It's only double density for formatting pur-
  651. poses.   It's still physically a high density drive, so it can still read
  652. and write high density disks.
  653.  
  654. If you wanted to,  you could even  give the exact same  |sDEVIC|1E|s=|sDRIVER.SYS|s
  655. command twice in a row,  making two extra |nlogical drives|n for one physical
  656. drive.   That could be useful for if you have a third floppy drive, which
  657. needs a DRIVER.SYS driver  to even work,  and then the second  DRIVER.SYS
  658. line, for that drive,  would set up a logical drive twin for it,  so that
  659. you could copy between disks in that drive.
  660.                    <page down> for more Logical Drives
  661. All right,  how do you use |sDRIVER.SYS|s?   Well it's not too hard.   Here's
  662. the syntax:
  663.           |sDEVIC|1E|s=D:\DIR\DRIVER.SYS /D:# /F:#
  664. where D: is the drive where the DRIVER.SYS file is located,  \DIR\ is the
  665. directory where that file is located, and here are the switches:
  666.  
  667. /D:# is the physical drive number that you want the logical drive to be a
  668. ghost twin to.   0 is for drive A:, 1 is for B:, 2 is for the next floppy
  669. drive, etc.
  670.  
  671. /F:#  tells DOS what type of  logical drive you're setting up.   Here are
  672. the choices:   0 for 360K, 1 for 1.2M, 2 for 720K, 7 for 1.44M, and 9 for
  673. 2.88M.   The default is 2,  so if you're setting up a 720K logical drive,
  674. you can leave out the /F:# switch.
  675.  
  676. So here's the command you would use to make a 720K logical drive twin for
  677. your 3.5" 1.44M A: drive:
  678.           |sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:0
  679. For a 360K logical drive twin for your 5.25" 1.2M B: drive:
  680.                    <page down> for more Logical Drives
  681.           |sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:1 /F:0
  682. For a 1.2M logical drive twin for your 5.25" 1.2M B: drive:
  683.           |sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:1 /F:1
  684. Or for a 1.44M logical drive twin for your 3.5" 1.44M A: drive:
  685.           |sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:0 /F:7
  686. Of course all those examples assume  that your DRIVER.SYS file is located
  687. in the \DOS directory of your C: drive.
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.                      <page down> for The |nFCBS|n Command
  701.                              The |TFCBS|T Command
  702.  
  703. This command is used in the CONFIG.SYS file.   It tells DOS how many File
  704. Control BlockS to keep available.   Only old applications are still using
  705. FCBs.   Nowadays File Handles  are used instead.   That's what the  FILES
  706. command  in CONFIG.SYS is for.   These are  the two methods  that DOS has
  707. used to keep track of open files,  files that are in use at the moment by
  708. some application.   |nFCBS|n  is the old way,  FILES is  the new way.   DOS's
  709. default setting for |nFCBS|n is 4,  and valid values are 1 through 255.   You
  710. really  won't need  to use this command  unless you use  some application
  711. that tells you  in its manual to use this command.   The syntax is FCBS=#
  712. where # is the number you want to use.
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.                     <page down> for The |nFILES|n Command
  721.                             The |TFILES|T Command
  722.  
  723. This command  is used in the  CONFIG.SYS file,  and it tells DOS how many
  724. files  can be open  or in use  at one time.   File |thandles|t is the new way
  725. that DOS goes about keeping track of open files,  whereas FCBS is the old
  726. way.   If you have an application that tells you to have FILES=15 in your
  727. CONFIG.SYS file, and another application that tells you to have FILES=30,
  728. then use FILES=30.  Just use the highest number that any of your applica-
  729. tions tells you to use.
  730.  
  731. The higher  the number  you give  in your |nFILES|n command,  the more memory
  732. will be used by the table that DOS sets up to keep track of the file han-
  733. dles,  so don't use more  than you need.   Then again,  DOS only uses  39
  734. bytes for each file handle  above the default,  so having 50 file |nhandles|n
  735. is only going to use up  1638 bytes  and that's not very much,  so if you
  736. have an application  that requires  FILES=50,  don't let it  depress you.
  737. You can have  anywhere from  8 up to 255,  and the default value that DOS
  738. will use if you don't have a |nFILES|n command in your CONFIG.SYS file, is 8.
  739.  
  740.                    <page down> for The |nINSTALL|n Command
  741.                            The |TINSTALL|T Command
  742.  
  743. This command is used  in the CONFIG.SYS file,  to load a TSR into memory.
  744. It can only be used with |sTSR|ss that you don't hotkey into,  and that don't
  745. require any help  from the command interpreter,  because at the time |nCON|n-
  746. FIG.SYS is read, COMMAND.COM  (the command interpreter) hasn't been load-
  747. ed into memory yet.
  748.  
  749. You can use  this command  for  FASTOPEN, GRAPHICS, KEYB, NLSFUNC, SHARE,
  750. and many others, but not all |sTSR|ss.
  751.  
  752. The advantage  of using the |nINSTALL|n command  in CONFIG.SYS  to load |sTSR|ss,
  753. rather than loading them  the normal way  from the AUTOEXEC.BAT file,  is
  754. that all |sTSR|ss loaded after COMMAND.COM has been loaded, receive a copy of
  755. the environment.  This wastes memory.  If you load a TSR from CONFIG.SYS,
  756. COMMAND.COM is not in memory yet so there is no environment, so obviously
  757. the TSR can't get a copy of it to waste memory like that.
  758.  
  759. The only disadvantages  of the |nINSTALL|n command  that I can think of,  are
  760.                        <page down> for more INSTALL
  761. that it doesn't work  for all |sTSR|ss,  and that if you're using DOS version
  762. 5.0, there is no INSTALLHIGH command, so you can't LOADHIGH any |sTSR|ss that
  763. you load from CONFIG.SYS in this manner.   And the |nINSTALL|n command didn't
  764. even exist until DOS version 4.
  765.  
  766. The syntax is quite simple.   Just |nINSTALL|n followed by an equals (=) sign
  767. and then the full |spath|sname for the TSR you want to install:
  768.           INSTALL=C:\DOS\SHARE.EXE /F:1024 /L:20
  769. (The /F and /L switches are parameters for the SHARE command, not for the
  770. |nINSTALL|n command.)   You do have to include the full |spath|sname for the com-
  771. mand file,  unless it is in the root directory of the boo|1t disk,  because
  772. at the time the CONFIG.SYS file is read, AUTOEXEC.BAT hasn't been run yet
  773. so the PATH variable in the environment does not exist, so DOS can't find
  774. the file  unless it's in the root directory  of the boo|1t disk,  or unless
  775. you specify  the full path  on the |nINSTALL|n  command line.   And you don't
  776. want to leave the command file in the root directory,  because that clut-
  777. ters it up.   So go ahead and keep the file in a subdirectory and use the
  778. full |spath|sname as in that example above.
  779.  
  780.                   <page down> for The |nLASTDRIVE|n Command
  781.                           The |TLASTDRIVE|T Command
  782.  
  783. This command is used  in the CONFIG.SYS file  to tell DOS how many drives
  784. you are going to need  to be able to access.   The default is E so if you
  785. have five or fewer drives,  then you have no need for this command.   But
  786. if you  already have  five drives  and you add  a RAMdisk  or you use the
  787. DRIVER.SYS device driver to create more logical drives,  then you need to
  788. use this command to tell DOS you need more drive letters.   The syntax is
  789. really simple.  LASTDRIVE=F is all there is to it!
  790.  
  791. It does take memory  for DOS to keep track of all your drives  (about 100
  792. bytes each),  so don't use the command LASTDRIVE=Z  (the highest allowed)
  793. unless you really do use 26 drives!
  794.  
  795. In DOS  version 5,  the default  is not  necessarily E.   It's one letter
  796. higher than the actual number of physical drives you have.   For example,
  797. if you only have two floppy drives and a drive C:,  then the default will
  798. be D:.   If you have  four floppy drives  and two  hard drive partitions,
  799. then the default will be G.
  800.                     <page down> for The |nSTACKS|n Command
  801.                             The |TSTACKS|T Command
  802.  
  803. This command can only be used in a CONFIG.SYS file.   About the only time
  804. you'll ever want to use this command, is to set it like this to save mem-
  805. ory:
  806.           STACKS=0,0
  807.  
  808. But if you ever get an error message such as "Stack overflow", or if your
  809. system locks up  when you type too fast,  then you'll want to remove that
  810. command again to make DOS use the default values.   (The default for 8088
  811. computers already is 0,0 but for 286 or higher, the default is 9,128.)
  812.  
  813. If you still get that error message,  try a command like STACKS=15,128 or
  814. even 20,512 if necessary.  Other than 0,0 the other acceptable values are
  815. anywhere from 8,32 to 64,512.
  816.  
  817. The first number  means number of stacks,  and the second means number of
  818. bytes in each stack.   9,128 means 9 and 128,  not nine thousand one hun-
  819. dred twenty-eight.
  820.                        <page down> for more STACKS
  821. So what is this "stacks" stuff anyway?   Well every time you hit a key on
  822. the keyboard,  that generates a hardware |tinterrupt|t.   Every time a bit of
  823. data comes across your modem, that generates an |ninterrupt|n.  Each time the
  824. floppy disk controller says,  "Ok, I'm done writing that file you told me
  825. to write", that's an |ninterrupt|n.   The computer has to have a place to put
  826. what it's working on,  so that it can handle the |ninterrupt|n and go back to
  827. what it was doing before, and that place is what the stacks are.
  828.  
  829. In case  a software program you're using  doesn't have enough stack space
  830. built into it,  the computer will need  for DOS to have  some stack space
  831. set up.   If a stack overflow occurs,  generally that's going to  lock up
  832. the computer  tighter than a drum,  and the only thing  you'll be able to
  833. do is reboot.   The very next thing  you'll want to do  is edit your |nCON|n-
  834. FIG.SYS  file to allocate  some more stack space,  and then  reboot again
  835. to make the new CONFIG.SYS file take effect,  so it doesn't happen again.
  836.  
  837.  
  838.  
  839.  
  840.                    <page down> for The |nSWITCHAR|n Command
  841.                            The |TSWITCHAR|T Command
  842.  
  843. This command  only existed  in DOS versions 2.0 and 2.1,  and it could be
  844. used in the  CONFIG.SYS file to tell DOS  what character  you want to use
  845. for switch parameters.   For example, if you used the UNIX operating sys-
  846. tem a lot,  that system uses a  - for a switch character.   Then when you
  847. use DOS you would have to get used to using  / instead.   Well if you put
  848. the command SWITCHAR=- into your CONFIG.SYS file,  then you could say DIR
  849. -P instead of DIR /P  and it would be more like the UNIX system  you were
  850. used to.   If you don't have DOS version 2,  then you can't use this com-
  851. mand.  And if you aren't used to some other operating system besides DOS,
  852. then you have no need for this command!
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.                    <page down> for The |nSWITCHES|n Command
  861.                            The |TSWITCHES|T Command
  862.  
  863. This command was introduced with version 4 of DOS,  and it can be used in
  864. the CONFIG.SYS file to make DOS treat an |nextended|n 101-key keyboard like a
  865. |nconventional|n 84-key keyboard.   If you're running  a program that doesn't
  866. like your |nextended|n keyboard,  try the command  SWITCHES=/K in your CONFIG
  867. .SYS file and reboot.   Now DOS will totally ignore the scan codes passed
  868. by those extra keys,  and use the scan codes  for their matching  regular
  869. keys instead, so they can't confuse your application or cause your system
  870. to crash anymore.   What I mean by that is if you hit the <*> key over on
  871. the numeric keypad,  DOS will ignore that scan code  and use the code for
  872. the <*> key  over on the regular part  of the keyboard.   If you use this
  873. command  and also install the  ANSI.SYS device driver,  use the /K switch
  874. with ANSI also, as in:
  875.           |sDEVIC|1E|s=C:\DOS\ANSI.SYS /K
  876.  
  877.  
  878.  
  879.  
  880.             <page down> for The |nSHELL|n and |nSET|n |nCOMSPEC|n Commands
  881.                     The |TSHELL|T and SET |TCOMSPEC|T Commands
  882.  
  883. Many experts say that it is just good sense to have a "clean" root direc-
  884. tory.   That means you want to have the smallest possible number of files
  885. in the root directory.  Many people will try to tell you that COMMAND.COM
  886. is one of the files  that must remain in the root directory,  but this is
  887. just not true.
  888.  
  889. When you boot your computer,  the first files loaded into memory  are the
  890. Hidden files,  which are named |tIO.SYS|t and |tMSDOS.SYS|t if you use MS-DOS, or
  891. |tIBMBIO.COM|t  and |tIBMDOS.COM|t  if you use PC-DOS.   (These two  Hidden files
  892. must be in the root directory  of the boo|1t disk,  and in most versions of
  893. DOS they must be the first two files stored on the disk, or they will not
  894. be found and you will receive the "|sNon system disk|s replace and strike any
  895. key" message which means the computer is not going to boot up!)   Next, a
  896. file called  CONFIG.SYS  (which must always be  in the root directory  in
  897. order for DOS to find it) is read, then COMMAND.COM is loaded.  DOS looks
  898. in the root directory to find COMMAND.COM.
  899.  
  900.                   <page down> for more SHELL and COMSPEC
  901. However, if there was a |nSHELL|n statement in CONFIG.SYS,  then DOS will in-
  902. stead search the directory indicated there!   Next, COMMAND.COM reads and
  903. executes each line  of your AUTOEXEC.BAT file,  if one is present in your
  904. root directory.  After this process is complete, you are greeted by a DOS
  905. prompt and that's the end of the boot sequence.
  906.  
  907. Now if you run a program which requires a great deal of memory, the tran-
  908. sient portion of COMMAND.COM  will drop out of memory,  to leave room for
  909. this program.   Therefore,  the first thing that DOS needs to do when you
  910. exit from this program, is to reload COMMAND.COM.   However, this reload-
  911. ing cannot use  the |nSHELL|n statement  in CONFIG.SYS  to find the directory
  912. where  COMMAND.COM resides.   CONFIG.SYS can only be read  by DOS  during
  913. |sboot|sup.   But DOS knows that it should check the environment  for a vari-
  914. able called |nCOMSPEC|n.  The |nCOMSPEC|n variable tells DOS where to look to re-
  915. load COMMAND.COM,  whereas the |nSHELL|n statement tells DOS where to look to
  916. find COMMAND.COM during |sboot|sup.   Therefore you need both  of these items
  917. if you want to move COMMAND.COM out of the root directory.
  918.  
  919. There are two ways to set this |nCOMSPEC|n environment variable:
  920.                   <page down> for more SHELL and COMSPEC
  921. 1.  The SET |nCOMSPEC|n statement in the AUTOEXEC.BAT.   You could also enter
  922. this command from the command line if you ever want to.  Here it is:
  923.           SET COMSPEC=C:\DOS\COMMAND.COM
  924. (That is assuming that DOS is the name of the directory to which you have
  925. moved COMMAND.COM.)
  926. 2.  The |nSHELL|n statement  in CONFIG.SYS.   Most people will tell you  that
  927. the |nSHELL|n statement should look like this:
  928.           SHELL=C:\DOS\COMMAND.COM /P
  929. However, this will not set the |nCOMSPEC|n variable in the environment.  With
  930. just a slight change to the |nSHELL|n statement, though, like this:
  931.           SHELL=C:\DOS\COMMAND.COM C:\DOS /P
  932. the second occurrence of the name  of the directory  will tell DOS to set
  933. the |nCOMSPEC|n  variable.   It seems  redundant,  but it is  necessary to do
  934. this,  or when you  exit a large program  you will receive  this message:
  935. "|tInvalid COMMAND.COM|t system halted",  because if the  |nCOMSPEC|n variable is
  936. set incorrectly,  then DOS has  no way of finding COMMAND.COM.   There is
  937. nothing you can do about that except reboot.
  938.  
  939. So remember,  you can move COMMAND.COM out of the root directory and into
  940.                   <page down> for more SHELL and COMSPEC
  941. a subdirectory,  but only if you use the "long form" of the |nSHELL|n command
  942. in CONFIG.SYS,  or else the |nCOMSPEC|n statement in AUTOEXEC.BAT  along with
  943. the "short form"  of the |nSHELL|n statement.   But which one of those should
  944. you use?  Well, it doesn't really matter.  Actually I'd say use the short
  945. form of |nSHELL|n, and then do your |nCOMSPEC|n setting in the AUTOEXEC.BAT file,
  946. after all your |sTSR|ss are loaded.  That would save you four bytes of memory
  947. for each TSR  you use.   (Because  by default,  the environment  will say
  948. COMSPEC=C:\COMMAND.COM  so the four extra bytes come from  the characters
  949. "DOS\".)   If you're  scrimping  for memory,  you never want  to add  any
  950. strings to the environment  until all of your |sTSR|ss have been loaded,  be-
  951. cause each TSR gets a copy of what's in the environment, causing each TSR
  952. to take up more memory than it needs.
  953.  
  954. If you do not move COMMAND.COM  from the root directory,  you do not need
  955. the |nSHELL|n statement,  unless you want to increase the size of your envir-
  956. onment.   If you receive an "Out of environment space" message,  you will
  957. need this line in your CONFIG.SYS file:
  958.           SHELL=C:\COMMAND.COM /E:nnn /P
  959. where nnn = the number of bytes  (for DOS 3.2 or later)  or the number of
  960.                   <page down> for more SHELL and COMSPEC
  961. 16-byte paragraphs  (for DOS 3.1)  of environment space you would like to
  962. have.   In this case, you do not need to specify the directory name where
  963. COMMAND.COM is,  twice,  since COMMAND.COM is in  the root directory,  so
  964. |nCOMSPEC|n will be set automatically.  The purpose of this form of the |nSHELL|n
  965. line is only to enlarge the environment.
  966.  
  967. Of course,  if you do have  COMMAND.COM  in a subdirectory,  and you need
  968. more environment space also,  you can combine those statements like this:
  969.           SHELL=C:\DOS\COMMAND.COM C:\DOS /E:nnn /P
  970.  
  971. About the size  of the environment  you want to set:   The default is 160
  972. bytes  (except for DOS version 5, where the default is 256 |sbytes|s),  so if
  973. you've run out  of space,  obviously you need  a higher number than that.
  974. The highest number  you can use is 32,767.   A good setting is 256 bytes.
  975. Don't increase it over that  unless you run out  of space  with that set-
  976. ting.  Also, the number of bytes in the environment must be a multiple of
  977. 16, or DOS will "round up" and give you a multiple of 16 anyway.   And if
  978. you have DOS 3.1, remember to use the number of 16-byte paragraphs, rath-
  979. er than the number of bytes.
  980.                   <page down> for more SHELL and COMSPEC
  981. By the way,  the purpose of the /P is to cause COMMAND.COM to be the pri-
  982. mary command interpreter, as opposed to being a secondary shell which can
  983. be exited from.  (See shelling out.)  The primary shell runs AUTOEXEC.BAT
  984. whenever it is done loading.   If there is no  |nSHELL|n statement,  AUTOEXEC
  985. .BAT  will be called anyway.   But if  there is a  |nSHELL|n statement,  then
  986. AUTOEXEC.BAT will only be called if the /P switch is on it.  Now the fact
  987. that /P causes COMMAND.COM  to be the primary shell,  is quite important.
  988. If you left out the /P in the SHELL statement, and you accidentally typed
  989. EXIT at the DOS prompt, then COMMAND.COM would drop out of memory and you
  990. wouldn't be able to do anything except reboot.
  991.  
  992. One more thing about the |nCOMSPEC|n environment variable.   The default set-
  993. ting is the root directory  of the disk you |sboot|sed from,  unless you tell
  994. DOS otherwise.   So if you have a hard drive, but you sometimes boot from
  995. a floppy disk,  then when you do, you'll probably want to issue a command
  996. such as  SET COMSPEC=C:\DOS\COMMAND.COM  depending on where  your COMMAND
  997. .COM file really is,  so that DOS will use  that copy  instead of  always
  998. asking you to  "Place disk with COMMAND.COM into drive A:" every time you
  999. exit from a large program after having |sboot|sed from the floppy drive.
  1000.                          <page down> for The |nPATH|n
  1001.                                  The |tPATH|t
  1002.  
  1003. A |npath|n in DOS is just the road that DOS  would have to follow through the
  1004. directories,  in order to find  a file that you  want it to find.   For a
  1005. file named FOO.BAR  in the subdirectory  called ABC  which is a subdirec-
  1006. tory of the subdirectory called DEF which is a directory on the D: drive,
  1007. (got that?) the full filespec for that file would be  D:\DEF\ABC\FOO.BAR,
  1008. and the \DEF\ABC\ part is the |npath|n for that file.
  1009.  
  1010. When you type in a command  at the DOS prompt,  if you have not specified
  1011. the |npath|n to the command file  on the command line,  and if the command is
  1012. not an  internal part  of COMMAND.COM,  then DOS will search  the current
  1013. directory for the file, and if it's not there,  DOS will search each dir-
  1014. ectory listed  on the |nPATH|n variable  in the environment.   When you first
  1015. boot up your computer, the |nPATH|n variable looks like this:
  1016.           PATH=
  1017. It's not set equal to anything!  (You can use the SET command to view the
  1018. strings that are  in the environment.)   Therefore,  any external command
  1019. that's not in the current directory  (unless you've specified the correct
  1020.                         <page down> for more PATH
  1021. |npath|n on the command line),  will not be found,  and you will  receive the
  1022. famous  "|sBad command or filename|s" message.   What you need to do is put a
  1023. |nPATH|n statement  into your AUTOEXEC.BAT,  which lists  all the directories
  1024. where your  most common commands reside.   That way,  DOS will know where
  1025. to look  to find  these command files  in order to execute them,  even if
  1026. you are not currently in the directory where they reside.
  1027.  
  1028. All of your DOS commands that came with your computer should be in a dir-
  1029. ectory called DOS.  This should be one of the first directories listed on
  1030. your |nPATH|n.   DOS searches the directories  in the order in which they are
  1031. listed on the |nPATH|n statement.  So you don't want the directory which con-
  1032. tains your  most commonly used commands at the end of the |nPATH|n statement,
  1033. because this will increase the time it takes  for DOS to find the command
  1034. file.
  1035.  
  1036. Why don't you just put  all of your directories on the PATH?   Three rea-
  1037. sons:  First, the entire |nPATH|n statement, including PATH=, can only be 127
  1038. characters long!  Second, most programs don't know how to find their com-
  1039. panion files using the |nPATH|n statement, and those programs that don't know
  1040.                         <page down> for more PATH
  1041. how to use an environment variable either, to find their companion files,
  1042. won't be able to find  their companion files  unless the files are in the
  1043. current directory.   Therefore,  there would be no purpose in having this
  1044. directory on the |nPATH|n, since if you start the program from another direc-
  1045. tory, the program won't be able to run anyway.  For this type of program,
  1046. you have to change to the program's directory before you run it, and that
  1047. is all there is to it!   Third, the longer the |nPATH|n statement, the longer
  1048. it will take DOS to search all the directories on it,  in order to find a
  1049. command file  that you've asked it  to execute!   A batch file  is a very
  1050. simple and effective way to avoid having a long |nPATH|n variable.
  1051.  
  1052. Here's an example of a |nPATH|n statement:
  1053.           |nPATH|n C:\DOS;C:\UTIL;C:\DOS\BIN
  1054. Notice that each directory specified  is separated from the others with a
  1055. semicolon (;).   And always include the full  directory specification for
  1056. each directory,  including the drive letter,  as above,  instead of some-
  1057. thing like  |nPATH|n \DOS;\UTIL;\DOS\BIN,  because if the drive letter is not
  1058. included,  then when you have  A: as your current drive,  your |nPATH|n won't
  1059. work at all, because DOS will be searching on A: for the \DOS, \UTIL, and
  1060.                         <page down> for more PATH
  1061. \DOS\BIN directories, which don't exist on drive A:.  They're on C:.
  1062.  
  1063. Notice that in most cases,  you need to use the SET command to set an en-
  1064. vironment variable,  but for |nPATH|n and PROMPT,  the set command is not re-
  1065. quired.   Also,  on some systems,  an equals (=) sign is required between
  1066. |nPATH|n and the  rest of the statement.   So if something like  |nPATH|n C:\DOS;
  1067. C:\ABC won't work on your system, use PATH=C:\DOS;C:\ABC instead.   There
  1068. must never be any spaces  in the |nPATH|n statement,  except between |nPATH|n and
  1069. the rest of it,  and there should not be  a semicolon (;)  after the last
  1070. directory name!
  1071.  
  1072. Remember,  though,  that a |nPATH|n statement is never a requirement.   It is
  1073. only a time-saver  for you.   DOS could  just as easily  find any command
  1074. file if you were to include the  full file specification for the command,
  1075. on the command line.   For example, if you have a file named EXPLOSIV.COM
  1076. in the \UTIL directory of the C: drive,  and C:\UTIL is not on your |nPATH|n,
  1077. you can enter the command as C:\UTIL\EXPLOSIV  rather than just EXPLOSIV.
  1078.  
  1079.  
  1080.                         <page down> for The |nPROMPT|n
  1081.                                 The |tPROMPT|t
  1082.  
  1083. You know the |nprompt|n  that appears  on your  screen whenever DOS  wants to
  1084. know what you want to do next.  It looks like this:
  1085.           C>
  1086. Boring, isn't it?  But did you know that you can make the |nprompt|n say any-
  1087. thing you want it to say?  With the  |nPROMPT|n variable  in the |senvironment|s!
  1088. If you type this at the command line:
  1089.           |nPROMPT|n Hello
  1090. Then your |nprompt|n will be
  1091.           Hello
  1092. instead of the usual C>.   Notice that in most cases, you need to use the
  1093. SET command to set an environment variable,  but for PATH and |nPROMPT|n, the
  1094. SET command is not required.   Also,  on some systems, an equals (=) sign
  1095. is required between the word |nPROMPT|n and the rest of the statement.  So if
  1096. |nPROMPT|n Hello doesn't work on your system, use PROMPT=Hello instead.
  1097.  
  1098. There are many special symbols you can use to get special characters into
  1099. your |nprompt|n:
  1100.                        <page down> for more PROMPT
  1101.          $$  a $ symbol                 $_  a carriage return
  1102.          $b  a || symbol                 $d  the |ncurrent|n date
  1103.          $e  an ESCape character        $g  a > symbol
  1104.          $h  a backspace character      $l  a < symbol
  1105.          $n  the current drive          $q  a = symbol
  1106.          $p  the current directory      $t  the |ncurrent|n time
  1107.          $v  the DOS version             $  (space + $)  a trailing blank
  1108.  
  1109. The most commonly used |nPROMPT|n metacharacters are $p$g.  This |nprompt|n shows
  1110. what your current directory is at all times.  For example if your current
  1111. directory is C:\DOS, then your |nprompt|n will be C:\DOS>.   If you change to
  1112. the C:\UTIL directory,  using the CHDIR command,  then the |nprompt|n immedi-
  1113. ately changes to C:\UTIL>.  You almost always want to use this as part of
  1114. your |nprompt|n  if you're using a hard disk,  so you never forget  where you
  1115. are.   The only problem with this |nprompt|n is that it causes DOS to look at
  1116. your disk after every command,  to see what the current directory is,  so
  1117. that it can display  the current |sdirectory|s's name.   Well the reason this
  1118. can be considered as a problem,  is that if you switch  the current drive
  1119. to a floppy disk,  using the A|1: or B: command, before you put a disk into
  1120.                        <page down> for more PROMPT
  1121. that drive, you'll get an "|sAbort, Retry, Fail, Ignore|s" message.   It also
  1122. really slows things down on a floppy drive,  because it takes DOS so much
  1123. longer to look at a floppy disk than to look at a hard disk.
  1124.  
  1125. So whenever  you're about to  switch over to work on  a floppy disk for a
  1126. while,  you might want to issue the |nPROMPT|n command all by itself, with no
  1127. parameters.  What that will do is to reset the |nprompt|n to the default (the
  1128. |nprompt|n that DOS  would normally use  unless you gave it some other |nPROMPT|n
  1129. command), which is just the equivalent of $n$g, which only shows the cur-
  1130. rent drive,  instead of the current drive and directory.   That way,  DOS
  1131. doesn't have to look at the disk  after each command  to read the current
  1132. |sdirectory|s's name.  And your |nprompt|n will just look like A> or C>.
  1133.  
  1134. For more information  on great things you can do with the |nPROMPT|n command,
  1135. see the section about ANSI.SYS.
  1136.  
  1137. One concern that comes up quite frequently, is that a body sometimes gets
  1138. a double |nprompt|n on his screen after running a batch file.  By that I mean
  1139. that the |nprompt|n looks like this:
  1140.                        <page down> for more PROMPT
  1141.           C:\DOS>
  1142.           C:\DOS>_
  1143. There are  four things that I can think of  right off  the bat,  that can
  1144. cause  this little annoyance.   First,  most any batch file  that doesn't
  1145. have "|sECHO|s OFF" in it,  will do that.   Second,  a lot of people have the
  1146. mistaken impression  that they have to turn ECHO back on  at the end of a
  1147. batch file.  Not true.   DOS turns ECHO on at the end of every batch file
  1148. whether the command is given or not.  The only thing an "|sECHO|s ON" line at
  1149. the end of a batch file does,  is to take an extra couple of milliseconds
  1150. to process the batch file, and to cause that nasty double |nprompt|n display.
  1151. One other thing  that can cause it,  is having  an extra  carriage return
  1152. (the <Enter> key) after the last line of the batch.  And finally, if none
  1153. of these  seems to be the problem,  you can just use EDLIN  to remove the
  1154. carriage return  from the last command  in the  batch file.   To do that,
  1155. just retype the line and hit the <F6> key before you hit the <Enter> key.
  1156. That'll do it.  But it's not a good idea.  You really want all your batch
  1157. files to end with a carriage return.   (Not more than one,  though.)   So
  1158. try not to  put your F6  or <Ctrl-Z>  before the <Enter> key.   There are
  1159. problems that can be caused by doing that.
  1160.                      <page down> for The |nEnvironment|n
  1161.                              The |tEnvironment|t
  1162.  
  1163. (See also SHELL for instructions on how to enlarge the |nenvironment|n.)
  1164.  
  1165. The |nenvironment|n is a sort of a scratch pad that DOS and many applications
  1166. programs know how to use for certain purposes.   Certain functions of DOS
  1167. know that if they need some information, this information can possibly be
  1168. found in the |nenvironment|n,  and memory is set up in such a way  that these
  1169. functions  know where to look  to find the |nenvironment|n.   So,  if you set
  1170. these information variables in the |nenvironment|n, then the information will
  1171. be there when it is needed.
  1172.  
  1173. The variables that DOS can use are  COMSPEC, PATH, and PROMPT.   Also any
  1174. batch file can use variables  that have been placed  into the |nenvironment|n
  1175. using the  SET command.   Many programs are written  so that they know to
  1176. look for a certain variable in the |nenvironment|n.   For example,  many pro-
  1177. grams need to use files other than the main executable program file while
  1178. they're running.   Programs will look for these files in the current dir-
  1179. ectory, whatever directory you were in when you first loaded the program.
  1180.                      <page down> for more Environment
  1181. Some programs though,  know that if the files are not located in the cur-
  1182. rent directory, they may be located in a directory specified by a certain
  1183. variable in the |nenvironment|n.  So if you have previously set that particu-
  1184. lar variable to be equal to the directory  where these files are located,
  1185. then the program will be able to find these overlay files.
  1186.  
  1187. Suppose the manual to your word processor says that the program knows how
  1188. to search  for files  in a directory  specified by  a WORD variable.  And
  1189. suppose  all your  word processing  files  are in a directory  called WP.
  1190. Then what you want to do is put the line  SET WORD=C:\WP  into your AUTO-
  1191. EXEC.BAT file or into the batch file you use to start that program.   Now
  1192. your word processor will always be able to find its files, even if you do
  1193. not change to the WP directory  before you start the program.   If a pro-
  1194. gram uses |nenvironment|n variables in this way,  it will be mentioned in the
  1195. installation chapter of that program's manual.
  1196.  
  1197. DOS version 5 uses two more |nenvironment|n variables than previous versions.
  1198. The DIRCMD variable which relates to the DIR command,  and the TEMP vari-
  1199. able which is for redirection and for the DOSSHELL.
  1200.                      <page down> for The |nSET|n Command
  1201.                              The |TSET|T Command
  1202.  
  1203. This command is used to place variable strings into the environment.  The
  1204. syntax is |nSET|n VARIABLE=VALUE and the variable name will be changed to up-
  1205. percase,  but the value  will be placed into the environment  in the same
  1206. form it is entered  (except for in the case of the PATH variable, because
  1207. there all of the directory names will be uppercased).  The value and var-
  1208. iable name can include any alphanumeric characters.
  1209.  
  1210. You can also use the |nSET|n command, with no parameters, to see what strings
  1211. are already in the environment.   To remove a variable  from the environ-
  1212. ment, just set it equal to nothing, like this:
  1213.           |nSET|n VARIABLE=
  1214.  
  1215. If you use the |nSET|n command  to set a variable  that already exists in the
  1216. environment,  the new string  replaces  the old string.   There is no way
  1217. outside of  a batch file,  to add another string  to the end  of a string
  1218. that's already there, without retyping the part that's already there.
  1219.  
  1220.                     <page down> for The |nEXPAND|n Command
  1221.                             The |TEXPAND|T Command
  1222.  
  1223. This command is new with DOS version 5.0, and if you install DOS properly
  1224. using its own SETUP program,  you'll probably never need to use this com-
  1225. mand.   You may have noticed  that most of the filenames  on the disks in
  1226. the upgrade package  are missing the last character  of their extensions.
  1227. For example,  all the  .COM files  have an extension of  .CO_.   Well the
  1228. files are also compressed,  so that they take up  less disk space.   They
  1229. are not usable at all  in this format.   The |nEXPAND|n command  can put them
  1230. back to their normal usable form.
  1231.  
  1232. Here's an example of the syntax you use:
  1233.           |nEXPAND|n A:\HIMEM.SY_ C:\DOS\HIMEM.SYS
  1234. That will take  the compressed HIMEM.SYS file  from the disk in drive A:,
  1235. expand it to its usable form,  and give it its proper name, and put it in
  1236. the \DOS directory on drive C:.  So if you accidentally deleted the HIMEM
  1237. .SYS file from your \DOS directory  and you couldn't get it back with the
  1238. UNDELETE command, or if you had QEMM installed when you installed DOS 5.0
  1239. so the SETUP procedure  didn't install the  HIMEM.SYS file to begin with,
  1240.                        <page down> for more EXPAND
  1241. that's how you can get it back.
  1242.  
  1243. If you need to expand more than one file from the original DOS disks, you
  1244. can do something like this:
  1245.           |nEXPAND|n A:\HIMEM.SY_ A:\EMM386.EX_ A:\ATTRIB.EX_ C:\DOS
  1246. That command will expand  all three of those files  from the original DOS
  1247. disks,  but it will put them into the C:\DOS directory with the same sil-
  1248. ly names they have now.   You'll have to use  the RENAME command  to make
  1249. them usable.  You can't specify the full filenames for the |nexpanded|n files
  1250. if you expand more than one file at at time.  And you can't use wildcards
  1251. with this command at all.
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.                     <page down> for The |nFDISK|n Command
  1261.                             The |TFDISK|T Command
  1262.  
  1263. This command is used to create,  delete,  or change hard drive |tpartition|ts
  1264. and to create, delete, or change logical drives within a |npartition|n.  Par-
  1265. titions and logical drives  on a hard drive  just make it so that you can
  1266. have a C: drive and a D: drive and an E: drive, or whatever you want, in-
  1267. stead of having  a great big C: drive by itself.   |nFDISK|n just divides the
  1268. hard drive into different sections,  and DOS references each section with
  1269. a different drive letter,  even though it's really still part of the same
  1270. physical hard drive.
  1271.  
  1272. If you have an MS-DOS or PC-DOS version earlier than 4.0,  then you can't
  1273. have any hard drive |npartition|n larger than 32 mega|sbytes|s.  If you have ver-
  1274. sion 4 you can have a larger |npartition|n  but you have to install the SHARE
  1275. TSR every time  you boot your computer.   If you have version 5,  you can
  1276. have whatever size partitions you want without using SHARE.
  1277.  
  1278. A |npartition|n that's smaller than 16 megs will have a 4K cluster size,  and
  1279. that's not good.  Because every file on the disk,  even a tiny batch file
  1280.                         <page down> for more FDISK
  1281. that's only 27 bytes long,  will use up a whole cluster of disk space.  A
  1282. partition larger than 16 megs will have only 2K in each cluster,  so that
  1283. way you only waste  half as much disk space with a tiny file.  Unless the
  1284. partition is too large,  that is, like over 128 megs,  because those par-
  1285. titions also have the 4K cluster size, or even larger!
  1286.  
  1287. Don't ever forget  that if you change anything  about a logical drive  or
  1288. a partition,  with the |nFDISK|n command,  every single speck of data on that
  1289. logical drive or partition will be lost.   Make sure you have a perfectly
  1290. good BACKUP before you do anything  with |nFDISK|n  other than just switching
  1291. the active partition or displaying partition information.  Anything under
  1292. the Create Partition or Delete Partition menu entries will remove all the
  1293. data from the partition involved,  and from the ones with higher letters.
  1294.  
  1295. Another thing  that happens when  you create or delete  logical drives or
  1296. partitions, is that drive letters change.   For example, if you have a C:
  1297. drive and a D: drive,  and you use a RAMdisk whose letter is E:, and then
  1298. you use |nFDISK|n to remove your D: partition  and put the entire drive space
  1299. into C:, then the next time you reboot, your RAMdisk will have the letter
  1300.                         <page down> for more FDISK
  1301. D: instead of E:,  because a RAMdisk  just gets the next letter  in order
  1302. after whatever real drives  you have.   So you'll need to change all your
  1303. batch files that reference the RAMdisk to make them say D: instead of E:.
  1304.  
  1305. If your hard drive came  with its own partitioning software,  then use it
  1306. instead of the |nFDISK|n command.
  1307.  
  1308. After you've changed any partition on your hard drive, you must FORMAT it
  1309. before it can be used.  And if you're going to Low-Level Format your hard
  1310. drive, then that must be done before the |nFDISK|n procedure.
  1311.  
  1312. To enlarge a partition, you must delete it and then recreate it.
  1313.  
  1314. The |nFDISK|n command won't let you delete a partition  without your entering
  1315. the correct volume label,  so if there's something funky about your label
  1316. and |nFDISK|n won't accept the label as you type it, exit back to DOS and use
  1317. the LABEL command  to change the label  to something else that |nFDISK|n will
  1318. accept, and then try |nFDISK|n again.
  1319.  
  1320.                         <page down> for more FDISK
  1321. You can only actually have two |spartition|ss on a drive,  but you can set up
  1322. as many logical drives as you want inside the second partition.
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.                     <page down> for The |nFORMAT|n Command
  1341.                             The |TFORMAT|T Command
  1342.  
  1343. What on earth is this |nFORMAT|n command  that most DOS manuals expect you to
  1344. understand  with very little  explanation?   The manuals say that it pre-
  1345. pares a disk for use by DOS.   Well what does that mean?  It can be visu-
  1346. alized like the lines on a parking lot.  A person knows how to park a car
  1347. even when there are no lines at all.  However, DOS isn't that smart.  DOS
  1348. cannot even begin to think about parking a file on a disk,  unless it can
  1349. see the lines on the parking lot!   The |nFORMAT|n command is what paints the
  1350. lines there.   That's why a disk can't be used until it's been formatted.
  1351.  
  1352. The only  exceptions to this  are the DISKCOPY command,  which copies the
  1353. entire source disk, including the format,  so the target disk need not be
  1354. formatted first, and some versions of BACKUP programs, which can call the
  1355. |nFORMAT|n command to format the disks during the BACKUP process.
  1356.  
  1357. Don't forget that if there are any files on the disk,  the |nFORMAT|n command
  1358. will wipe out  all the directory entries  for all the files.   Your files
  1359. will basically be gone.   There are hard drive  utility packages  such as
  1360.                        <page down> for more FORMAT
  1361. Central Point's PC Tools and Symantec's Norton Utilities that can get the
  1362. files back for you, and also in DOS version 5.0 there is an UNFORMAT com-
  1363. mand, but it's a lot easier to just not format a disk,  than it is to un-
  1364. format it.   Before you format any disk that's been used before,  be sure
  1365. to check the directory to see if there's anything you might want to save.
  1366.  
  1367. Formatting |tfloppy|t disks  can get kind of  tricky sometimes.   You need to
  1368. understand the differences among all the different types of |nfloppy|n disks.
  1369. Right now there are only four types that are the least bit popular.  They
  1370. are 360K, 720K, 1.2M, and 1.44M.
  1371.  
  1372. A 360K disk  holds 362,496  bytes of data.   The physical size  of such a
  1373. disk is 5.25 inches,  and the disk is enclosed in a really flimsy plastic
  1374. cover.   Another name for it  besides "360K" is  DSDD or 2S2D which means
  1375. Double-Sided, Double-Density.
  1376.  
  1377. A 720K disk holds 730,112 bytes of data.  This type of disk is 3.5 inches
  1378. in size, and it is enclosed in a nice hard sturdy plastic shell.   It can
  1379. also be referred to as a DSDD or 2S2D disk,  which is the same thing that
  1380.                        <page down> for more FORMAT
  1381. a 360K disk can be called.  So you have to watch out for what size you're
  1382. buying, as well as what density.
  1383.  
  1384. A 1.2M disk is a DSHD (High-Density) 5.25-inch disk.   It holds 1,213,952
  1385. bytes  of data.   And a  1.44M disk is a  DSHD 3.5-inch disk  which holds
  1386. 1,457,664 bytes of data.
  1387.  
  1388. Some manufacturers write  things like "2M"  on a box of  1.44M disks,  or
  1389. "1M" on a box  of 720Ks,  but they're not giving you  any more space than
  1390. the other manufacturers do!   They're just trying to make you  think they
  1391. are.   The "2M" means  the capacity of the disk  before it is  formatted!
  1392. When a disk is formatted it gets a |nboot|n record, a FAT,  a root directory,
  1393. some |ssector|s headers,  and things like that  so that DOS  will be able  to
  1394. work with the disk.  Once a "2M" disk has been formatted, it has 1.44M of
  1395. space left for data,  just like any other DSHD 3.5-inch disk.   Don't let
  1396. those marketing departments fool you!
  1397.  
  1398. A HD (High Density)  disk drive can read and write either HD or DD disks,
  1399. but a DD (Double Density) drive can only use DD disks.   In fact, most DD
  1400.                        <page down> for more FORMAT
  1401. drives can't even read a DD disk if it was formatted by a HD drive.   The
  1402. way to transfer data between a HD drive and a DD drive,  is by formatting
  1403. the disk that will be used, on the DD drive, then writing to it on the HD
  1404. drive.  Then the DD drive will usually be able to read it.
  1405.  
  1406. Unless you  tell it otherwise,  the |nFORMAT|n command  will format a disk to
  1407. the highest capacity the drive supports.   For example, if you don't tell
  1408. |nFORMAT|n any particular size switches,  a HD drive will format  any disk to
  1409. HD capacity.   (If it's a disk that's only rated for DD capacity,  you're
  1410. likely to get an  error message like  "|tTrack 0 bad|t, disk unusable".)   If
  1411. you're trying to format a disk to HD capacity,  make sure it's a HD disk!
  1412. If you're trying to format a DD disk, all you have to do is tell the FOR-
  1413. MAT command that's what you want to do.
  1414.  
  1415. You can format  a DD disk to its DD capacity  in a HD drive,  but only if
  1416. you use  the correct switches  with the |nFORMAT|n command.   Here's where it
  1417. gets complicated.  If you have DOS version 4 or higher, you just say:
  1418.           |nFORMAT|n A: /F:720   or   |nFORMAT|n A: /F:360
  1419. to format the disk  to the desired capacity.   But before  DOS version 4,
  1420.                        <page down> for more FORMAT
  1421. it was not so easy!
  1422.  
  1423. Under DOS version 3 you can use the command:
  1424.           |nFORMAT|n A: /4
  1425. to format a 360K disk in a 1.2M drive.  But that one won't work to format
  1426. a 720K disk in a 1.44M drive.  For that, you have to use the command:
  1427.           |nFORMAT|n A: /N:9 /T:80
  1428. Of course this only works  in DOS version 3.3,  since before that,  there
  1429. was no such thing as a 1.44M drive anyway.
  1430.  
  1431. Well, that wasn't really so hard after all,  was it?   The only hard part
  1432. is memorizing something like /N:9 /T:80.  You can write a batch file that
  1433. will remember those switches for you,  and name it 720K.BAT or something.
  1434.  
  1435. It's really a very bad idea to try to format a disk to some capacity oth-
  1436. er than what it was made for.   In some cases it can be done, but even if
  1437. it seems to work, it is not reliable.   The data might sit on such a disk
  1438. for a couple years if you're really lucky, but suddenly it will just dis-
  1439. appear,  and of course that will happen right when you need that data the
  1440.                        <page down> for more FORMAT
  1441. most.   So if you want to format a disk to High Density,  buy a High Den-
  1442. sity disk.   If you want to format a disk to Double Density, buy a Double
  1443. Density disk.   Of course if you only have  a Double Density drive,  then
  1444. you don't have to worry about this--DD disks  are the only kind that your
  1445. drive will even try to read.
  1446.  
  1447. If you want to assign a volume label to the disk  as soon as it's format-
  1448. ted,  you include the /V switch on the command line,  and when formatting
  1449. is complete,  DOS will ask you  what you want the label to be.   With DOS
  1450. version 4 and later,  DOS is going to  ask you at the end,  what you want
  1451. the volume label to be,  whether you include the /V switch in the command
  1452. or not.   So the only reason  to use the /V then,  is if you want to tell
  1453. DOS in advance,  what the label will be,  so that DOS won't stop  and ask
  1454. you.  You just put the label on the /V switch like this:  /V:WHATEVER and
  1455. DOS will automatically put that WHATEVER label onto the disk.
  1456.  
  1457. If you want the disk to be |sboot|sable, you format it with the /S switch.
  1458.  
  1459. You can reformat and reuse disks  as many times as you want,  but there's
  1460.                        <page down> for more FORMAT
  1461. one thing to be careful of.  If you reuse a disk you're probably going to
  1462. want to change  the paper label that's on  the outside of the disk.   For
  1463. goodness' sake, if it's a 5.25" floppy disk,  do not use a hard ballpoint
  1464. pen  or a pencil or anything  to write  on any label  that's on the disk.
  1465. Use a felt-tip pen or write on a new label  and put the label on the disk
  1466. after you write on it.   And don't  ever put  a disk in the drive  if its
  1467. label is coming loose because it can get stuck and come off in the drive.
  1468.  
  1469. It's perfectly normal  to get a few  |tbad sector|ts  when formatting a disk.
  1470. Almost every hard drive in the world has some, and it's not that rare for
  1471. a floppy to have a few.  Sometimes if you reformat the disk, the bad sec-
  1472. tors will be cleared up, sometimes not.  DOS marks the bad |ssector|ss off in
  1473. the FAT  as if they were  already  in use,  so that  your data  won't get
  1474. stored there.   If CHKDSK tells you that you have bad |ssector|ss,  those are
  1475. the ones  that have already been  marked as bad.   There is no danger in-
  1476. volved here.   Those |ssector|ss won't be used for your data because the disk
  1477. already knows they are bad.   The only problem with bad |ssector|ss,  is when
  1478. they are not already marked as bad.   CHKDSK won't know about those,  and
  1479. DOS will put data into them.   There are only two ways  in DOS to get bad
  1480.                        <page down> for more FORMAT
  1481. |ssector|ss marked.  The |nFORMAT|n command, and the RECOVER command.  Other than
  1482. those, there are tons of third-party utilities such as PC Tools's DISKFIX
  1483. and Gibson's SpinRite.   Some people will try to tell you that CHKDSK can
  1484. fix |sbad sector|ss, but it can't.  Not even close.  CHKDSK doesn't touch any
  1485. part of a disk except the FAT and the directories.   It can't go near the
  1486. data area of the disk, so it can't tell any unmarked |sbad sector|ss exist!
  1487.  
  1488. Starting with DOS version 4.0, every disk that gets formatted gets a ser-
  1489. ial number, which is a unique number that the computer picks based on the
  1490. time of the system clock.  This number will be displayed whenever you use
  1491. the DIR or CHKDSK commands,  and can be used  by some programs which were
  1492. written to be able to use it,  to make sure  that the correct disk  is in
  1493. the drive.  Why?   Well imagine that the program is storing some informa-
  1494. tion in memory  and you take a disk out of the drive  and put a different
  1495. one in.   Well if the program doesn't notice that you changed disks,  and
  1496. it writes that data  from memory to the disk,  it could trash  the FAT of
  1497. that disk.   If the program checks the serial number first, and sees that
  1498. you changed disks, then it won't do such a lousy rotten thing.   Instead,
  1499. it will tell you to put the first disk back into the drive.
  1500.                        <page down> for more FORMAT
  1501. The rest of this section  is about the changes  in DOS version 5.0's FOR-
  1502. MAT command, so if you don't have version 5, don't pay too much attention
  1503. to this or you might get confused  about what your version of DOS is cap-
  1504. able of.  Check it out to see what you're missing, though.
  1505.  
  1506. DOS version 5.0's  new |nFORMAT|n command does  a "safe" format,  which means
  1507. that it does the same thing  the MIRROR command does,  namely it stores a
  1508. copy of the disk's FAT  and root directory  in a little file named |nMIRROR|n
  1509. .FIL, before it formats the disk.  Then if you realize ten minutes later,
  1510. before you've written  any more data to that disk,  that it was the wrong
  1511. disk  and you didn't mean  to format that one,  you can use  the UNFORMAT
  1512. command  to put it back  the way it was  right  before you  formatted it.
  1513. This "safe"  format  is what DOS  will use  if you don't  specify  the /U
  1514. switch  and if you don't try  to reformat a disk  to a different capacity
  1515. than that at which it was originally formatted.   (You don't need to have
  1516. the |nMIRROR|n.COM file available to make this work though,  because the app-
  1517. licable parts of that command's code are inside the |nFORMAT|n.COM file.)
  1518.  
  1519. The first new switch for the DOS version 5.0 |nFORMAT|n command is /Q.   That
  1520.                        <page down> for more FORMAT
  1521. stands for  quick format.   The FAT  and root directory  are treated just
  1522. like normal,  but no surface scanning is done.   Normally the |nFORMAT|n com-
  1523. mand checks for  |sbad sector|ss on the disk  and if any are found,  they are
  1524. marked as bad in the FAT  so that DOS will never try to store any of your
  1525. data  in those spots.   But |nFORMAT|n /Q  skips this step.   Therefore,  you
  1526. should never use this switch with a brand new disk,  and you should never
  1527. use it on a disk from which you have received any read errors.
  1528.  
  1529. Then there is the /U switch which stands for unconditional,  but it would
  1530. really make more sense  to think of it  as standing for unsafe.   Because
  1531. this switch causes the |nFORMAT|n command to not run the MIRROR program, so a
  1532. disk that's been formatted with the /U switch can't be |sUNFORMAT|sted.   The
  1533. /U switch should always be used for brand new disks, because this'll make
  1534. the process go a lot faster and work a lot better.
  1535.  
  1536. The /F switch is not new to version 5, but one of its parameters is.  You
  1537. can use /F:2.88  to format a 2.88M disk  if you have  one of the new disk
  1538. drives that support that size.
  1539.  
  1540.                        <page down> for more FORMAT
  1541. If you're formatting  a previously-used disk that was very full,  and you
  1542. don't use  the /U switch,  DOS is going to try  to save the  FAT and root
  1543. directory data to a Hidden |nMIRROR|n.FIL file on the disk, but it won't have
  1544. room.   It will tell you there's not enough room, and ask you if you want
  1545. to go ahead  and format the disk  anyway.   If you tell it yes,  then you
  1546. won't be able to UNFORMAT that disk later,  no matter what.   If you tell
  1547. it no,  the |nFORMAT|n command will abort  and you can delete a couple of the
  1548. files to make room for the |nMIRROR|n.FIL file and try the |nFORMAT|n again,  but
  1549. isn't that pretty silly?   If you take time  to look on the disk  and see
  1550. what files are there and delete a couple of them, you may as well look at
  1551. all of them and make sure you're not going to need any of them,  and do a
  1552. regular |nFORMAT|n /U instead of the safe |sUNFORMAT|stable format.
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.                    <page down> for The |nGRAPHICS|n Command
  1561.                            The |TGRAPHICS|T Command
  1562.  
  1563. This  command loads a TSR  into memory,  that will  allow you  to use the
  1564. <PrtScrn> or  <Shift-PrtScrn>  key to print your screen  even when you're
  1565. not looking at a plain old text screen.   You'll probably want to use the
  1566. /R switch  which  tells DOS  to print  black  characters  on white paper,
  1567. otherwise DOS will tell the printer  to print the background in black and
  1568. leave white spaces in the shape of the letters.   Isn't that silly?  That
  1569. will take about a year to print, and about a ribbon and a half!
  1570.  
  1571. If you have DOS version 4 or later, you'll find a file named |nGRAPHICS|n.PRO
  1572. in your DOS directory.  That's the instruction profile that |nGRAPHICS|n will
  1573. use to talk to the printer.   If your printer is not  closely enough com-
  1574. patible with an IBM printer,  then hopefully your printer dealer supplied
  1575. you with your own .PRO file to use.   Just rename it to  |nGRAPHICS|n.PRO and
  1576. the |nGRAPHICS|n command  will use it automatically.   It must be in the same
  1577. directory with the |nGRAPHICS|n.COM file though.
  1578.  
  1579.  
  1580.                      <page down> for The |nHELP|n Command
  1581.                              The |THELP|T Command
  1582.  
  1583. This command is new to DOS version 5.   If you type just |nHELP|n, you'll get
  1584. a list of all the DOS commands  and a very short description of what each
  1585. is for.   If you type this command  followed by the name of  another com-
  1586. mand, such as |nHELP|n ATTRIB,  then the |nHELP|n command will load a copy of the
  1587. ATTRIB command  and feed it the /? switch.   So you'll get the exact same
  1588. result as if you'd typed ATTRIB /?.   Because most of the commands in DOS
  1589. 5.0 have a little screen of syntax information inside them.
  1590.  
  1591. For an example, here's what you'll see if you type MD /? or |nHELP|n MD:
  1592.           Creates a directory.
  1593.  
  1594.           MKDIR [drive:]|spath|s
  1595.           MD [drive:]|spath|s
  1596.  
  1597. Not all that helpful, huh?   Only if you've temporarily forgotten  how to
  1598. use the command, not if you didn't already know how to use it.
  1599.  
  1600.                      <page down> for The |nJOIN|n Command
  1601.                              The |TJOIN|T Command
  1602.  
  1603. This is not exactly the safest of commands.   If you ever have any desire
  1604. to try it, don't,  unless you have a |ncurrent|n BACKUP of all the disks that
  1605. will be involved.  This command didn't exist until DOS version 3.1.
  1606.  
  1607. This command is used to join one disk drive to an empty directory of some
  1608. other drive, so that it will seem like the files on the drive are instead
  1609. files in the empty directory on the other drive.
  1610.  
  1611. The syntax is like this:
  1612.           |nJOIN|n D: D:\DIR
  1613. Suppose you want the files on drive A:  to appear that they  are files in
  1614. the \OTHER directory on drive C:.   You would first make sure you have an
  1615. empty directory (with no files or other subdirectories in it) named OTHER
  1616. branching from the root directory on drive C: (if there is no such direc-
  1617. tory, |nJOIN|n will create it), then issue the |nJOIN|n A: C:\OTHER command.  Now
  1618. when you do a DIR of C:\OTHER, the access light on drive A: will light up
  1619. for a minute,  and a directory listing of the drive A: files will appear.
  1620.                         <page down> for more JOIN
  1621. Now if you issued the command DIR A:, you'd get an error message, "Inval-
  1622. id drive specification" because drive A: doesn't exist anymore.
  1623.  
  1624. To show  what drives  might be under the effect  of a |nJOIN|n command,  just
  1625. enter |nJOIN|n all by itself,  with no parameters,  and it will say something
  1626. like  A: => C:\OTHER  and if you want to unjoin them, just do |nJOIN|n A: /D.
  1627. That puts everything on drive A: and C:\OTHER back to normal.
  1628.  
  1629. APPEND, ASSIGN,  BACKUP, CHDIR, CHKDSK,  DEL, DISKCOMP, DISKCOPY,  ERASE,
  1630. FASTOPEN,  FDISK, FORMAT,  LABEL,  MIRROR, MKDIR,  PATH, PRINT,  RECOVER,
  1631. RESTORE,  RMDIR,  SUBST,  and SY|1S are all commands that shouldn't be used
  1632. with a |nJOIN|n in effect.
  1633.  
  1634. And note that if you write any files to a JOINed directory, they will not
  1635. actually be written to that directory at all.   They'll be written to the
  1636. disk  that is joined to the directory.   That directory stays  completely
  1637. empty the whole time the |nJOIN|n is in effect.   |nJOIN|n is not a TSR.  It does
  1638. not use up any memory.  That's about the only good thing to say about it.
  1639.  
  1640.                     <page down> for The |nLABEL|n Command
  1641.                             The |TLABEL|T Command
  1642.  
  1643. This command  is used to put  an |ninternal|n label  onto a disk.   You know,
  1644. when you do a DIR command  and it comes up  and says,  "Volume in drive C
  1645. is Whatever"?  "Whatever" is the |tvolume|t label.
  1646.  
  1647. You can use the  /V switch  with the FORMAT command  to put the label on,
  1648. or you can use the |nLABEL|n command.  The syntax is incredibly simple:
  1649.           |nLABEL|n C:
  1650.           |nLABEL|n A:
  1651. Whatever drive's disk  you want to label,  you just put  that letter  and
  1652. a colon after the |nLABEL|n command.
  1653.  
  1654. Now DOS will come back and say  what the |ncurrent|n |nvolume|n label of the disk
  1655. is,  and ask you what you want to change it to.   You type what you want,
  1656. anything up to eleven characters  and it can include spaces,  and hit the
  1657. <Enter> key.   If you want to leave the same label, or if you want to de-
  1658. lete the label,  then you just hit <Enter>  without typing anything.   It
  1659. will ask you if you want to delete the label, so just answer the question
  1660.                         <page down> for more LABEL
  1661. with Y or N depending on what you want to do.
  1662.  
  1663. In recent DOS versions, you can also include the new label on the command
  1664. line, like this:
  1665.           |nLABEL|n C:NEW NAME
  1666. and then it won't ask you anything.   If that won't work for your version
  1667. of DOS, and you need to be able to do this without the command asking you
  1668. for further input,  for example for use in a batch file, you can probably
  1669. use ECHO NEW NAME || |nLABEL|n C: instead.  (See redirection.)
  1670.  
  1671. Volume labels are stored  as directory entries,  and they show up in your
  1672. CHKDSK readouts  as Hidden files as well,  even though they don't take up
  1673. any disk space like files do.  The CHKDSK command just doesn't understand
  1674. the Volume attributes, so it interprets them as Hidden ones instead.
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                     <page down> for The |nMIRROR|n Command
  1681.                             The |TMIRROR|T Command
  1682.  
  1683. This command is new to DOS version 5.0, but many of us have been using it
  1684. for quite some time.   Microsoft licensed it from Central Point Software,
  1685. the makers of PC Tools.   It performs two great functions.   First, every
  1686. time you reboot the computer  it stores a copy of your FAT,  |nboot|n record,
  1687. and root directory  in a nice safe place,  for in case your originals get
  1688. trashed,  then you can use the UNFORMAT command to put them back together
  1689. again.   The files that |nMIRROR|n makes  are called MIRORSAV.FIL,  which has
  1690. its Hidden,  System,  and Read-only attributes turned on,  and |nMIRROR|n.FIL
  1691. and |nMIRROR|n.BAK,  which have their Read-only attributes turned on.   These
  1692. files are  going to go  into your root directory  whether you  like it or
  1693. not.   There's no way you can put them somewhere else, because if you do,
  1694. the program will just create new ones in the root directory the next time
  1695. you reboot.   But you don't have to leave them visible  in your directory
  1696. listing.  The program recreates them each time, so you can't just turn on
  1697. their Hidden attributes and leave it at that.  The next time you boot up,
  1698. they will be  recreated without any  Hidden attributes.   But you can put
  1699. the command  ATTRIB +H |nMIRROR|n.*  into your AUTOEXEC.BAT file  right after
  1700.                        <page down> for more MIRROR
  1701. the  |nMIRROR|n command,  and you'll never see  those files  in a DIR listing
  1702. again unless you use the /A switch with the DIR command.
  1703.  
  1704. Also,  if you use the /T switch,  |nMIRROR|n will install a TSR called Delete
  1705. Tracking.   This one watches everything you do,  and whenever you (or any
  1706. program)  try to delete a file,  it keeps a record of it  and stores that
  1707. record in a file named  PCTRACKR.|nDEL|n  in your root directory,  so that if
  1708. you should end up  wanting to undelete the file,  all the information the
  1709. UNDELETE command will need will be right there in that file,  so that you
  1710. have a 100% chance  of getting all of the file back  unless you  (or some
  1711. program)  have written something  to the disk in the spot  where the file
  1712. was,  between the time you deleted the file and the time you used the UN-
  1713. DELETE command on it.   This  PCTRACKR.|nDEL|n file  has its System attribute
  1714. turned on,  so you won't be bothered with looking at it in your DIR list-
  1715. ings all the time.   It's also pretty difficult to delete this file.  Be-
  1716. cause it keeps a record of  every file you delete,  if you delete it,  it
  1717. recreates itself immediately in order to store a record  of the fact that
  1718. you just deleted it.  The only way to get rid of it is to reboot the com-
  1719. puter without  the /T switch  in the |nMIRROR|n command  in your AUTOEXEC.BAT
  1720.                        <page down> for more MIRROR
  1721. file, then use the command ATTRIB -S PCTRACKR.|nDEL|n, and then delete it.
  1722.  
  1723. One thing you do not want to do if you ever do the command FORMAT C:,  or
  1724. RECOVER C:, or DEL *.*, or ERASE *.* in the root directory, is reboot the
  1725. computer to see if the problem clears up.  Sometimes |sreboot|sing can cure a
  1726. multitude of ills in a computer, but not in this case.   And because MIR-
  1727. ROR stores the two most recent mirror images  of your FAT and root direc-
  1728. tory, if you reboot once after you trash your drive, then your first copy
  1729. of the mirror image is bad, and if you reboot again, now both your copies
  1730. are bad and it's like as if you never used |nMIRROR|n in the first place.  In
  1731. that case,  the UNFORMAT command will have a terrible time trying to help
  1732. you.  So don't do that.  If |sreboot|sing once doesn't fix it, then |sreboot|sing
  1733. again won't either, and just destroys most of your chances for recovery.
  1734.  
  1735. The syntax for this command is like this:
  1736.           |nMIRROR|n D: D: D: /1 /TD-## /TD-## /TD-##
  1737. where the D:s are  the drive letters  for which you want  to save the FAT
  1738. and root directory information,  /1 means you only want to save  the most
  1739. recent copy  instead of  the two most  recent copies,  the Ds with the /T
  1740.                        <page down> for more MIRROR
  1741. switches tell what drives you want delete tracking installed for  (that's
  1742. right,  it's one of the rare times  you want to  refer to  a drive letter
  1743. without including a colon),  and the  ##s stand for  how many entries you
  1744. want to save for each drive.   For example,  here's the command I have in
  1745. my AUTOEXEC.BAT file:
  1746.           |nMIRROR|n C: /TC-50
  1747. which means  to save the FAT and directory information  for the C: drive,
  1748. and install delete tracking to monitor deletions on the C: drive and save
  1749. information on only the 50 most recent files that I've deleted.
  1750.           |nMIRROR|n C: D: /TC-100 /TD-50 /TE-25
  1751. would save the FAT  and directory information  for drives C: and D:,  and
  1752. load delete tracking to save information on the most recent 100 deletions
  1753. on drive C:,  the most recent 50  deletions on drive D:,  and the 25 most
  1754. recent deletions on drive E:.
  1755.  
  1756. The value  you use  for the -## parameter  can be from 1 to 999,  and the
  1757. default depends on the size of the disk in question.   If you have a hard
  1758. drive larger than 32M,  the default will be a 55K file containing records
  1759. of the 303 most recent files you deleted.
  1760.                        <page down> for more MIRROR
  1761. You can unload  the deletion tracking TSR  by using the /U switch,  as in
  1762. |nMIRROR|n /U,  but it only works if you haven't loaded  any other |sTSR|ss since
  1763. the time you loaded |nMIRROR|n, or if you unload the later |sTSR|ss first.
  1764.  
  1765. Of course,  for the |nMIRROR|n command  to work its magic,  it has to  be run
  1766. every day, and that means putting the command in your AUTOEXEC.BAT file.
  1767.  
  1768. The Hidden file that |nMIRROR|n saves some of its data in, MIRORSAV.FIL, gets
  1769. stored in the very last cluster  on your hard drive,  and if that spot on
  1770. your disk is bad,  |nMIRROR|n will take a long time to run each time.   So if
  1771. you find  that it's taking  a long time,  you will want to run  a surface
  1772. scan utility  which will  mark out  |sbad sector|ss  in the FAT,  so that DOS
  1773. won't put any files in that spot.   Then the MIRORSAV.FIL  will go in the
  1774. next-to-last cluster on the disk instead,  and won't take so long to run,
  1775. and will be a lot more reliable that way anyhow.
  1776.  
  1777. Another thing |nMIRROR|n can do  is save a copy of your partition table  to a
  1778. floppy disk.  Put a disk into drive A: and type |nMIRROR|n /PARTN.  This will
  1779. allow you to recover from an "|sInvalid drive specification|s" message if you
  1780.                        <page down> for more MIRROR
  1781. ever get such a thing on your hard drive.  You only need to do that once,
  1782. ever, unless you repartition your drive, but make sure you don't lose the
  1783. floppy disk!  The file |nMIRROR|n /PARTN will put on the floppy will be named
  1784. PARTNSAV.FIL, and UNFORMAT is the command you use to restore it.
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.                  For beginning of File 5, see Executable
  1801. |tAUTOEXEC.BAT|t|fSIMPLY1|f
  1802. |TCLS|T|fSIMPLY1|f
  1803. |TFASTOPEN|T|fSIMPLY1|f
  1804. |TFAT|T|fSIMPLY1|f
  1805. |tInvalid drive specification|t|fSIMPLY1|f
  1806. |tUNDELETE|t|fSIMPLY1|f
  1807. |tUNFORMAT|t|fSIMPLY1|f
  1808. |tBatch|t|fSIMPLY2|f
  1809. |TECHO|T|fSIMPLY2|f
  1810. |tRedirection|t|fSIMPLY2|f
  1811. |TREM|T|fSIMPLY2|f
  1812. |TTEMP|T|fSIMPLY2|f
  1813. |T286|T|fSIMPLY3|f
  1814. |T8088|T|fSIMPLY3|f
  1815. |TBIOS|T|fSIMPLY3|f
  1816. |tBytes|t|fSIMPLY3|f
  1817. |tCache|t|fSIMPLY3|f
  1818. |tConventional|t|fSIMPLY3|f
  1819. |tDEVICEHIGH|t|fSIMPLY3|f
  1820. |TDO|1S|T|fSIMPLY3|f
  1821. |tExpanded|t|fSIMPLY3|f
  1822. |teXtended|t|fSIMPLY3|f
  1823. |tHig|1h|t|fSIMPLY3|f
  1824. |tHIMEM.SYS|t|fSIMPLY3|f
  1825. |tkernel|t|fSIMPLY3|f
  1826. |tLOADHIGH|t|fSIMPLY3|f
  1827. |tMemory|t|fSIMPLY3|f
  1828. |TPRINT|T|fSIMPLY3|f
  1829. |tRAMdisk|t|fSIMPLY3|f
  1830. |tRAMDRIVE.SYS|t|fSIMPLY3|f
  1831. |TRAM|T|fSIMPLY3|f
  1832. |TRECOVER|T|fSIMPLY3|f
  1833. |TRESTORE|T|fSIMPLY3|f
  1834. |TSHARE|T|fSIMPLY3|f
  1835. |tSMARTDRV.SYS|t|fSIMPLY3|f
  1836. |TSUBST|T|fSIMPLY3|f
  1837. |tTSR|t|fSIMPLY3|f
  1838. |tUpper|t|fSIMPLY3|f
  1839. |TA|1:|T|fSIMPLY5|f
  1840. |TAUX|T|fSIMPLY5|f
  1841. |tBad command or filename|t|fSIMPLY5|f
  1842. |TCHDIR|T|fSIMPLY5|f
  1843. |tCOMMAND.COM|t|fSIMPLY5|f
  1844. |TCON|T|fSIMPLY5|f
  1845. |TCOPY|T|fSIMPLY5|f
  1846. |TCOUNTRY|T|fSIMPLY5|f
  1847. |tcurrent|t|fSIMPLY5|f
  1848. |tdefault|t|fSIMPLY5|f
  1849. |TDEL|T|fSIMPLY5|f
  1850. |tDevice|1s|t|fSIMPLY5|f
  1851. |TDIRCMD|T|fSIMPLY5|f
  1852. |tDirectory|t|fSIMPLY5|f
  1853. |TDIR|T|fSIMPLY5|f
  1854. |TERASE|T|fSIMPLY5|f
  1855. |tExecutable|t|fSIMPLY5|f
  1856. |TEXIT|T|fSIMPLY5|f
  1857. |texternal|t|fSIMPLY5|f
  1858. |tinternal|t|fSIMPLY5|f
  1859. |TKEYB|T|fSIMPLY5|f
  1860. |TMD|T|fSIMPLY5|f
  1861. |TMKDIR|T|fSIMPLY5|f
  1862. |TNLSFUNC|T|fSIMPLY5|f
  1863. |TPRN|T|fSIMPLY5|f
  1864. |TRENAME|T|fSIMPLY5|f
  1865. |TRMDIR|T|fSIMPLY5|f
  1866. |troot|t|fSIMPLY5|f
  1867. |tShelling Out|t|fSIMPLY5|f
  1868. |TTYPE|T|fSIMPLY5|f
  1869. |t*.*|t|fSIMPLY6|f
  1870. |tAbort, Retry, Fail, Ignore|t|fSIMPLY6|f
  1871. |tASCII|t|fSIMPLY6|f
  1872. |TBBS|T|fSIMPLY6|f
  1873. |tBoot|t|fSIMPLY6|f
  1874. |tBoo|1t Disk|t|fSIMPLY6|f
  1875. |tcluster|t|fSIMPLY6|f
  1876. |tdecimal|t|fSIMPLY6|f
  1877. |tDisks|t|fSIMPLY6|f
  1878. |tKeyboard|t|fSIMPLY6|f
  1879. |tLow-Level|t|fSIMPLY6|f
  1880. |tNon system disk|t|fSIMPLY6|f
  1881. |tParameters|t|fSIMPLY6|f
  1882. |tReboot|t|fSIMPLY6|f
  1883. |tsector|t|fSIMPLY6|f
  1884. |tShareware|t|fSIMPLY6|f
  1885. |TSY|1S|T|fSIMPLY6|f
  1886. |tWildcards|t|fSIMPLY6|f
  1887. |TAPPEND|T|fSIMPLY7|f
  1888. |TASSIGN|T|fSIMPLY7|f
  1889. |tAttributes|t|fSIMPLY7|f
  1890. |TATTRIB|T|fSIMPLY7|f
  1891. |TBACKUP|T|fSIMPLY7|f
  1892. |TCHKDSK|T|fSIMPLY7|f
  1893. |TDISKCOMP|T|fSIMPLY7|f
  1894. |TDISKCOPY|T|fSIMPLY7|f
  1895. |TDOSKEY|T|fSIMPLY7|f
  1896. |TDOSSHELL|T|fSIMPLY7|f
  1897. |TEDIT|T|fSIMPLY7|f
  1898. |TEDLIN|T|fSIMPLY7|f
  1899. |tHidden|t|fSIMPLY7|f
  1900. |toverlay|t|fSIMPLY7|f
  1901.